Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / OperationCanceledException.cs / 1305376 / OperationCanceledException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: OperationCanceledException ** ** ** Purpose: Exception for cancelled IO requests. ** ** ===========================================================*/ using System; using System.Runtime.Serialization; using System.Threading; namespace System { [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public class OperationCanceledException : SystemException { #if !FEATURE_CORECLR [NonSerialized] private CancellationToken _cancellationToken; public CancellationToken CancellationToken { get { return _cancellationToken;} private set { _cancellationToken = value;} } #endif //!FEATURE_CORECLR public OperationCanceledException() : base(Environment.GetResourceString("OperationCanceled")) { SetErrorCode(__HResults.COR_E_OPERATIONCANCELED); } public OperationCanceledException(String message) : base(message) { SetErrorCode(__HResults.COR_E_OPERATIONCANCELED); } public OperationCanceledException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_OPERATIONCANCELED); } #if !FEATURE_CORECLR public OperationCanceledException(CancellationToken token) :this() { CancellationToken = token; } public OperationCanceledException(String message, CancellationToken token) : this(message) { CancellationToken = token; } public OperationCanceledException(String message, Exception innerException, CancellationToken token) : this(message, innerException) { CancellationToken = token; } #endif //!FEATURE_CORECLR protected OperationCanceledException(SerializationInfo info, StreamingContext context) : base (info, context) { } } } // 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
- HMACSHA512.cs
- DataObjectFieldAttribute.cs
- HandleCollector.cs
- ReaderWriterLock.cs
- StreamWithDictionary.cs
- DataGridSortCommandEventArgs.cs
- Stack.cs
- EmptyQuery.cs
- NegationPusher.cs
- DataGridViewRowStateChangedEventArgs.cs
- DBDataPermissionAttribute.cs
- Terminate.cs
- AuthenticateEventArgs.cs
- Compiler.cs
- CoTaskMemSafeHandle.cs
- __FastResourceComparer.cs
- CheckBoxList.cs
- CompiledQueryCacheEntry.cs
- XmlSchemaAttribute.cs
- CapabilitiesSection.cs
- CallSiteOps.cs
- NonBatchDirectoryCompiler.cs
- DecimalAnimationBase.cs
- SecureStringHasher.cs
- QueryReaderSettings.cs
- IgnoreDeviceFilterElementCollection.cs
- FontDriver.cs
- ServiceElement.cs
- AutomationFocusChangedEventArgs.cs
- SignatureToken.cs
- RequestCacheValidator.cs
- FieldAccessException.cs
- PreviousTrackingServiceAttribute.cs
- MultiSelectRootGridEntry.cs
- HostingEnvironmentSection.cs
- Parameter.cs
- UserNameSecurityTokenParameters.cs
- SqlDataSourceAdvancedOptionsForm.cs
- SmtpCommands.cs
- PointValueSerializer.cs
- UpdateManifestForBrowserApplication.cs
- NativeMethods.cs
- Descriptor.cs
- ObsoleteAttribute.cs
- Random.cs
- bidPrivateBase.cs
- Behavior.cs
- EndpointDiscoveryMetadata.cs
- ImageFormat.cs
- XPathSingletonIterator.cs
- MulticastOption.cs
- VSWCFServiceContractGenerator.cs
- EpmSourcePathSegment.cs
- SqlConnectionString.cs
- DataTable.cs
- MsmqIntegrationBinding.cs
- CngAlgorithmGroup.cs
- TreeViewHitTestInfo.cs
- TextBoxBaseDesigner.cs
- HighlightVisual.cs
- MemberAccessException.cs
- PreviousTrackingServiceAttribute.cs
- MDIControlStrip.cs
- Properties.cs
- _SSPISessionCache.cs
- KeyInterop.cs
- HtmlInputHidden.cs
- ViewCellRelation.cs
- SoapFormatExtensions.cs
- BasicViewGenerator.cs
- HtmlTableRow.cs
- WebConfigurationFileMap.cs
- SqlOuterApplyReducer.cs
- ImageIndexEditor.cs
- xmlfixedPageInfo.cs
- DriveNotFoundException.cs
- ThrowHelper.cs
- Source.cs
- QueryGeneratorBase.cs
- ComponentCommands.cs
- Base64Decoder.cs
- CodeSnippetExpression.cs
- ProfileEventArgs.cs
- ColorTranslator.cs
- ISAPIApplicationHost.cs
- WebDescriptionAttribute.cs
- ContextQuery.cs
- ObjectPropertyMapping.cs
- CollectionsUtil.cs
- WindowsSolidBrush.cs
- MediaScriptCommandRoutedEventArgs.cs
- dataobject.cs
- SrgsGrammar.cs
- ActivityDesignerHelper.cs
- Imaging.cs
- RenderOptions.cs
- EdmItemError.cs
- ASCIIEncoding.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- VBIdentifierDesigner.xaml.cs