Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / Runtime / Reliability / ReliabilityContractAttribute.cs / 1 / ReliabilityContractAttribute.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: ReliabilityContractAttribute ** ** ** Purpose: Defines a publically documentable contract for ** reliability between a method and its callers, expressing ** what state will remain consistent in the presence of ** failures (ie async exceptions like thread abort) and whether ** the method needs to be called from within a CER. ** ** ===========================================================*/ using System.Runtime.InteropServices; namespace System.Runtime.ConstrainedExecution { // ************************************************************************************************************************* // // Note that if you change either of the enums below or the constructors, fields or properties of the custom attribute itself // you must also change the logic and definitions in vm\ConstrainedExecutionRegion.cpp to match. // // ************************************************************************************************************************* [Serializable] public enum Consistency : int { MayCorruptProcess = 0, MayCorruptAppDomain = 1, MayCorruptInstance = 2, WillNotCorruptState = 3, } [Serializable] public enum Cer : int { None = 0, MayFail = 1, // Might fail, but the method will say it failed Success = 2, } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)] public sealed class ReliabilityContractAttribute : Attribute { private Consistency _consistency; private Cer _cer; public ReliabilityContractAttribute(Consistency consistencyGuarantee, Cer cer) { _consistency = consistencyGuarantee; _cer = cer; } public Consistency ConsistencyGuarantee { get { return _consistency; } } public Cer Cer { get { return _cer; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: ReliabilityContractAttribute ** ** ** Purpose: Defines a publically documentable contract for ** reliability between a method and its callers, expressing ** what state will remain consistent in the presence of ** failures (ie async exceptions like thread abort) and whether ** the method needs to be called from within a CER. ** ** ===========================================================*/ using System.Runtime.InteropServices; namespace System.Runtime.ConstrainedExecution { // ************************************************************************************************************************* // // Note that if you change either of the enums below or the constructors, fields or properties of the custom attribute itself // you must also change the logic and definitions in vm\ConstrainedExecutionRegion.cpp to match. // // ************************************************************************************************************************* [Serializable] public enum Consistency : int { MayCorruptProcess = 0, MayCorruptAppDomain = 1, MayCorruptInstance = 2, WillNotCorruptState = 3, } [Serializable] public enum Cer : int { None = 0, MayFail = 1, // Might fail, but the method will say it failed Success = 2, } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)] public sealed class ReliabilityContractAttribute : Attribute { private Consistency _consistency; private Cer _cer; public ReliabilityContractAttribute(Consistency consistencyGuarantee, Cer cer) { _consistency = consistencyGuarantee; _cer = cer; } public Consistency ConsistencyGuarantee { get { return _consistency; } } public Cer Cer { get { return _cer; } } } } // 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
- assemblycache.cs
- ConnectionProviderAttribute.cs
- OracleTransaction.cs
- CodeSnippetExpression.cs
- ChangesetResponse.cs
- MessageRpc.cs
- SmuggledIUnknown.cs
- GCHandleCookieTable.cs
- AutomationPropertyInfo.cs
- Site.cs
- StylusPointCollection.cs
- NamespaceEmitter.cs
- SchemaTableOptionalColumn.cs
- Light.cs
- StdValidatorsAndConverters.cs
- CDSCollectionETWBCLProvider.cs
- ClientFormsAuthenticationCredentials.cs
- AnnotationAdorner.cs
- DataError.cs
- EndpointIdentity.cs
- ApplicationInfo.cs
- InputReportEventArgs.cs
- OperationCanceledException.cs
- BitmapCodecInfoInternal.cs
- TransformedBitmap.cs
- PageParserFilter.cs
- OpenFileDialog.cs
- ActiveXContainer.cs
- XmlNodeList.cs
- Style.cs
- TextPointer.cs
- GenericRootAutomationPeer.cs
- DesignBindingConverter.cs
- AuthenticatingEventArgs.cs
- ClientRuntimeConfig.cs
- TextServicesLoader.cs
- WeakReferenceList.cs
- ClientTargetCollection.cs
- RowParagraph.cs
- CompilationSection.cs
- HttpGetProtocolReflector.cs
- MutableAssemblyCacheEntry.cs
- CompositeControl.cs
- XmlNamespaceManager.cs
- ColumnBinding.cs
- DetailsViewDeleteEventArgs.cs
- SchemaObjectWriter.cs
- SrgsElementFactory.cs
- WebServiceMethodData.cs
- AspNetHostingPermission.cs
- SizeLimitedCache.cs
- _TLSstream.cs
- ReadOnlyPermissionSet.cs
- PropagatorResult.cs
- latinshape.cs
- BinaryWriter.cs
- ToolStripItemImageRenderEventArgs.cs
- WebServiceReceive.cs
- _DisconnectOverlappedAsyncResult.cs
- TableRow.cs
- UnsafePeerToPeerMethods.cs
- PackWebResponse.cs
- altserialization.cs
- UriTemplateVariablePathSegment.cs
- Point3DAnimation.cs
- IdentityModelStringsVersion1.cs
- MD5CryptoServiceProvider.cs
- PagePropertiesChangingEventArgs.cs
- CreateUserErrorEventArgs.cs
- ClientApiGenerator.cs
- ReachSerializationUtils.cs
- OdbcReferenceCollection.cs
- COM2IDispatchConverter.cs
- SortDescription.cs
- GeometryHitTestResult.cs
- MenuItemStyleCollection.cs
- Operators.cs
- OneOfTypeConst.cs
- DisplayNameAttribute.cs
- PageThemeBuildProvider.cs
- StrokeNode.cs
- WebPartCatalogCloseVerb.cs
- SystemFonts.cs
- XmlSortKey.cs
- BevelBitmapEffect.cs
- ManagementInstaller.cs
- BufferedReadStream.cs
- ProfileParameter.cs
- SoapSchemaExporter.cs
- ToolstripProfessionalRenderer.cs
- OutputCacheSettingsSection.cs
- AuthorizationRule.cs
- MessagePropertyDescription.cs
- AutoGeneratedField.cs
- ToolStripPanelRow.cs
- Rect.cs
- mongolianshape.cs
- HtmlHead.cs
- XmlNamespaceDeclarationsAttribute.cs
- DataAdapter.cs