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
- ObservableDictionary.cs
- TextTreeTextNode.cs
- MatrixTransform3D.cs
- DataGridViewCellParsingEventArgs.cs
- JulianCalendar.cs
- WorkflowTransactionService.cs
- PrefixQName.cs
- ComplexPropertyEntry.cs
- StreamWriter.cs
- ContractMapping.cs
- PersonalizablePropertyEntry.cs
- SafeTokenHandle.cs
- AsyncContentLoadedEventArgs.cs
- MDIClient.cs
- ServiceObjectContainer.cs
- DataGridParentRows.cs
- RegexCharClass.cs
- AmbiguousMatchException.cs
- TypeValidationEventArgs.cs
- ToolStripLocationCancelEventArgs.cs
- AnnotationComponentChooser.cs
- ReflectionTypeLoadException.cs
- Positioning.cs
- WrappedDispatcherException.cs
- OneOfTypeConst.cs
- SoapSchemaExporter.cs
- ParagraphVisual.cs
- HwndSource.cs
- TextTreeInsertElementUndoUnit.cs
- BulletChrome.cs
- CodeConditionStatement.cs
- Code.cs
- SafeMILHandle.cs
- XmlSchemaImporter.cs
- TouchDevice.cs
- AnimationLayer.cs
- SystemIcons.cs
- ProfileProvider.cs
- DataPointer.cs
- DependencyPropertyChangedEventArgs.cs
- CryptoProvider.cs
- ControlParameter.cs
- PageParserFilter.cs
- CodeMemberEvent.cs
- StickyNoteAnnotations.cs
- SwitchCase.cs
- ConfigurationManagerInternal.cs
- DesignerUtils.cs
- DeflateInput.cs
- DocumentEventArgs.cs
- BuildProviderInstallComponent.cs
- ButtonAutomationPeer.cs
- InputElement.cs
- TakeQueryOptionExpression.cs
- XmlUtil.cs
- Content.cs
- FileVersionInfo.cs
- VirtualPathData.cs
- ConnectionPoolManager.cs
- HtmlInputReset.cs
- XPathNodeIterator.cs
- PropertyEmitter.cs
- DataGridViewToolTip.cs
- InstanceKeyCompleteException.cs
- NameValuePair.cs
- ConfigDefinitionUpdates.cs
- autovalidator.cs
- ScrollProviderWrapper.cs
- DataRowChangeEvent.cs
- GiveFeedbackEvent.cs
- EncryptedPackageFilter.cs
- ObjectDataProvider.cs
- IndicFontClient.cs
- DetailsViewDesigner.cs
- Panel.cs
- PeerApplication.cs
- IsolatedStorageFilePermission.cs
- DockAndAnchorLayout.cs
- ProcessThreadCollection.cs
- ResXResourceWriter.cs
- TextPenaltyModule.cs
- PageOrientation.cs
- PenThreadWorker.cs
- WindowsGraphics2.cs
- DocumentPaginator.cs
- EncoderParameter.cs
- RuntimeHelpers.cs
- GroupQuery.cs
- VScrollProperties.cs
- DispatchProxy.cs
- ListViewTableRow.cs
- DecodeHelper.cs
- PageTheme.cs
- Console.cs
- TypeDescriptionProviderAttribute.cs
- XmlSecureResolver.cs
- ServiceChannelManager.cs
- URIFormatException.cs
- precedingsibling.cs
- HttpListenerRequest.cs