Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / ConsoleCancelEventArgs.cs / 2 / ConsoleCancelEventArgs.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: ConsoleCancelEventArgs ** ** ** Purpose: This class provides support goop for hooking Control-C and ** Control-Break, then preventing Control-C from interrupting the ** process. ** ** =============================================================================*/ namespace System { using System; public delegate void ConsoleCancelEventHandler(Object sender, ConsoleCancelEventArgs e); [Serializable] public sealed class ConsoleCancelEventArgs : EventArgs { private ConsoleSpecialKey _type; private bool _cancel; // Whether to cancel the CancelKeyPress event internal ConsoleCancelEventArgs(ConsoleSpecialKey type) { _type = type; _cancel = false; } // Whether to cancel the break event. By setting this to true, the // Control-C will not kill the process. public bool Cancel { get { return _cancel; } set { if (_type == ConsoleSpecialKey.ControlBreak && value == true) throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CantCancelCtrlBreak")); _cancel = value; } } public ConsoleSpecialKey SpecialKey { get { return _type; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AppDomain.cs
- bindurihelper.cs
- DesignerWidgets.cs
- SystemMulticastIPAddressInformation.cs
- ClientRoleProvider.cs
- DirectoryNotFoundException.cs
- CookielessHelper.cs
- MailHeaderInfo.cs
- Point3DAnimationUsingKeyFrames.cs
- PropertyValidationContext.cs
- ResourceSetExpression.cs
- XmlSchemaDocumentation.cs
- DataGridViewComboBoxColumn.cs
- DesignerActionUIService.cs
- BinaryNode.cs
- XmlSignificantWhitespace.cs
- LayeredChannelListener.cs
- FollowerQueueCreator.cs
- PropertyPathWorker.cs
- SQLInt64.cs
- TreeNodeCollection.cs
- CatalogZone.cs
- RepeaterItem.cs
- FixedDocument.cs
- CommandBinding.cs
- CheckableControlBaseAdapter.cs
- CounterSetInstanceCounterDataSet.cs
- EditingScopeUndoUnit.cs
- TextSchema.cs
- TextCharacters.cs
- MetadataCacheItem.cs
- MediaPlayer.cs
- AnimationLayer.cs
- COM2Enum.cs
- InputProcessorProfilesLoader.cs
- BrowserTree.cs
- DesignTimeVisibleAttribute.cs
- DataMemberFieldEditor.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- MarkerProperties.cs
- PaintValueEventArgs.cs
- OpenFileDialog.cs
- PrinterResolution.cs
- OLEDB_Util.cs
- SyndicationElementExtension.cs
- BamlMapTable.cs
- DetailsViewPagerRow.cs
- DataSourceCacheDurationConverter.cs
- MembershipUser.cs
- FlowDocument.cs
- SystemNetworkInterface.cs
- Separator.cs
- TypeViewSchema.cs
- autovalidator.cs
- NativeMethods.cs
- SecurityPermission.cs
- ProfileBuildProvider.cs
- WorkflowNamespace.cs
- Timer.cs
- ProxyWebPartManager.cs
- XmlAggregates.cs
- sqlcontext.cs
- SplashScreen.cs
- VisualTreeHelper.cs
- GraphicsPathIterator.cs
- basecomparevalidator.cs
- ConfigurationPropertyCollection.cs
- DataGridItemAttachedStorage.cs
- ToolStripLocationCancelEventArgs.cs
- SqlSupersetValidator.cs
- ScrollContentPresenter.cs
- XmlDictionaryString.cs
- TableAutomationPeer.cs
- IsolatedStorageFileStream.cs
- ExternalFile.cs
- HttpProfileGroupBase.cs
- TextTreeNode.cs
- GridViewDesigner.cs
- TextBox.cs
- DataSourceHelper.cs
- SafeNativeMethodsOther.cs
- BasicExpressionVisitor.cs
- XamlSerializerUtil.cs
- Rss20ItemFormatter.cs
- SafeRightsManagementPubHandle.cs
- ActionFrame.cs
- ViewGenerator.cs
- EntityReference.cs
- QueryInterceptorAttribute.cs
- ProviderSettings.cs
- CellTreeNodeVisitors.cs
- DiffuseMaterial.cs
- XmlSerializerOperationBehavior.cs
- CharConverter.cs
- IntegerFacetDescriptionElement.cs
- BaseUriHelper.cs
- CompletedAsyncResult.cs
- NumberSubstitution.cs
- TextOutput.cs
- CommonGetThemePartSize.cs