Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / Microsoft / Win32 / SessionEndingEventArgs.cs / 1305376 / SessionEndingEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace Microsoft.Win32 {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Provides data for the event.
///
[HostProtectionAttribute(MayLeakOnAbort = true)]
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")]
public class SessionEndingEventArgs : EventArgs {
private bool cancel;
private readonly SessionEndReasons reason;
///
/// Initializes a new instance of the class.
///
public SessionEndingEventArgs(SessionEndReasons reason) {
this.reason = reason;
}
///
/// Gets or sets a value indicating whether to cancel the user request to end the session.
///
public bool Cancel {
get {
return cancel;
}
set {
cancel = value;
}
}
///
/// Gets how the session is ending.
///
public SessionEndReasons Reason {
get {
return reason;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace Microsoft.Win32 {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Provides data for the event.
///
[HostProtectionAttribute(MayLeakOnAbort = true)]
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")]
public class SessionEndingEventArgs : EventArgs {
private bool cancel;
private readonly SessionEndReasons reason;
///
/// Initializes a new instance of the class.
///
public SessionEndingEventArgs(SessionEndReasons reason) {
this.reason = reason;
}
///
/// Gets or sets a value indicating whether to cancel the user request to end the session.
///
public bool Cancel {
get {
return cancel;
}
set {
cancel = value;
}
}
///
/// Gets how the session is ending.
///
public SessionEndReasons Reason {
get {
return reason;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CrossContextChannel.cs
- DocumentGridContextMenu.cs
- HttpRequestCacheValidator.cs
- InstanceCreationEditor.cs
- StructuredType.cs
- LabelEditEvent.cs
- ParserStreamGeometryContext.cs
- TypeElement.cs
- DataGridViewCellStateChangedEventArgs.cs
- SqlReferenceCollection.cs
- CommonDialog.cs
- ProjectedSlot.cs
- InkCanvasSelectionAdorner.cs
- SmiEventSink_Default.cs
- PathStreamGeometryContext.cs
- AuthenticationManager.cs
- ToolbarAUtomationPeer.cs
- BufferedGraphicsContext.cs
- GenerateScriptTypeAttribute.cs
- TabPage.cs
- DbExpressionRules.cs
- GridViewPageEventArgs.cs
- SQLInt32Storage.cs
- NumberSubstitution.cs
- Perspective.cs
- EmptyStringExpandableObjectConverter.cs
- LinqDataSourceContextEventArgs.cs
- HostingPreferredMapPath.cs
- AxWrapperGen.cs
- CodePropertyReferenceExpression.cs
- BindUriHelper.cs
- WebSysDefaultValueAttribute.cs
- XamlPathDataSerializer.cs
- ListSurrogate.cs
- ExpressionBuilderCollection.cs
- FragmentQueryKB.cs
- AutomationEvent.cs
- TemplateNameScope.cs
- CompressedStack.cs
- RelatedPropertyManager.cs
- WindowsNonControl.cs
- AmbientValueAttribute.cs
- LayoutTableCell.cs
- _ShellExpression.cs
- DocumentPageView.cs
- FlowDocumentReaderAutomationPeer.cs
- EntityViewGenerationAttribute.cs
- EntityDataSource.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- FormattedText.cs
- TypeSystemProvider.cs
- HttpInputStream.cs
- SynchronizationContextHelper.cs
- SecurityElement.cs
- ButtonChrome.cs
- IntPtr.cs
- GraphicsContext.cs
- ActiveXHost.cs
- GraphicsPath.cs
- PeerNameResolver.cs
- ErrorFormatterPage.cs
- ModelVisual3D.cs
- GridItemPatternIdentifiers.cs
- AnchoredBlock.cs
- TcpHostedTransportConfiguration.cs
- NumericUpDown.cs
- ProgressBar.cs
- XsdCachingReader.cs
- IfElseDesigner.xaml.cs
- UriSchemeKeyedCollection.cs
- TailCallAnalyzer.cs
- OpCellTreeNode.cs
- EntityParameterCollection.cs
- ArrayHelper.cs
- EntityAdapter.cs
- SecurityDocument.cs
- EntityStoreSchemaFilterEntry.cs
- querybuilder.cs
- Trustee.cs
- HttpInputStream.cs
- SystemInfo.cs
- TraceSwitch.cs
- DataRelationCollection.cs
- DataServiceQuery.cs
- ComEventsSink.cs
- XpsDocument.cs
- BasicKeyConstraint.cs
- DataGridViewCellStyle.cs
- DiscreteKeyFrames.cs
- ProgressBarBrushConverter.cs
- ImpersonateTokenRef.cs
- ConstructorBuilder.cs
- SliderAutomationPeer.cs
- AttributeCollection.cs
- ToolStripArrowRenderEventArgs.cs
- CollectionChangedEventManager.cs
- ResourceAttributes.cs
- Vector3DKeyFrameCollection.cs
- CompilerCollection.cs
- SaveFileDialogDesigner.cs