Code:
/ 4.0 / 4.0 / 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. // ==++== // // 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
- JsonFormatReaderGenerator.cs
- SurrogateChar.cs
- ListViewDeletedEventArgs.cs
- UInt16Converter.cs
- XmlQueryStaticData.cs
- AssociationSet.cs
- HtmlShimManager.cs
- ProcessProtocolHandler.cs
- DataSourceXmlClassAttribute.cs
- View.cs
- ToolStripArrowRenderEventArgs.cs
- CallbackHandler.cs
- BlobPersonalizationState.cs
- EnumerationRangeValidationUtil.cs
- updatecommandorderer.cs
- MimePart.cs
- ToolBarButton.cs
- HttpModuleAction.cs
- DocumentXPathNavigator.cs
- TimeSpanStorage.cs
- ConfigurationLocation.cs
- LayoutManager.cs
- ExpressionBindingCollection.cs
- DataGridViewRowCancelEventArgs.cs
- XhtmlConformanceSection.cs
- AssemblyBuilder.cs
- FieldBuilder.cs
- NullPackagingPolicy.cs
- NavigationFailedEventArgs.cs
- XmlSchemaSimpleContent.cs
- CacheDependency.cs
- ExpandedWrapper.cs
- EdmFunctions.cs
- Vector3dCollection.cs
- XamlTypeMapperSchemaContext.cs
- BinaryParser.cs
- SystemGatewayIPAddressInformation.cs
- CaseStatement.cs
- PropertySourceInfo.cs
- MenuItemCollection.cs
- PersonalizationDictionary.cs
- ButtonField.cs
- RegexCaptureCollection.cs
- PlainXmlWriter.cs
- BreakRecordTable.cs
- TabPage.cs
- SafeNativeMethodsCLR.cs
- ExpressionsCollectionConverter.cs
- WorkflowApplicationTerminatedException.cs
- QilPatternFactory.cs
- ToolTip.cs
- OleDbSchemaGuid.cs
- ConnectionsZone.cs
- XmlAttributeOverrides.cs
- MediaCommands.cs
- EmptyReadOnlyDictionaryInternal.cs
- TextBounds.cs
- SQLBoolean.cs
- DataListGeneralPage.cs
- TypePresenter.xaml.cs
- ClientSettingsProvider.cs
- UmAlQuraCalendar.cs
- SamlAssertion.cs
- PropertyDescriptorGridEntry.cs
- Helpers.cs
- TransformerConfigurationWizardBase.cs
- Help.cs
- TextTreeRootTextBlock.cs
- ControlDesigner.cs
- CryptoKeySecurity.cs
- IBuiltInEvidence.cs
- DataGridViewSelectedRowCollection.cs
- JpegBitmapDecoder.cs
- DataServiceResponse.cs
- DataRowCollection.cs
- SqlDataReaderSmi.cs
- Attributes.cs
- PlainXmlDeserializer.cs
- MappedMetaModel.cs
- ProvideValueServiceProvider.cs
- ScriptRegistrationManager.cs
- XPathNodeHelper.cs
- HtmlTextBoxAdapter.cs
- ActionFrame.cs
- QueryPageSettingsEventArgs.cs
- EncryptedType.cs
- EncryptedType.cs
- Utils.cs
- SharedStatics.cs
- StateWorkerRequest.cs
- Debugger.cs
- XD.cs
- metadatamappinghashervisitor.cs
- XPathException.cs
- DataGridSortCommandEventArgs.cs
- ApplicationServiceHelper.cs
- LicenseProviderAttribute.cs
- RequestDescription.cs
- X500Name.cs
- PrimitiveDataContract.cs