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
- Section.cs
- DelegateInArgument.cs
- BmpBitmapDecoder.cs
- StylusPointPropertyId.cs
- DataTemplateKey.cs
- PropertyBuilder.cs
- DynamicDocumentPaginator.cs
- RelatedCurrencyManager.cs
- WindowsScrollBarBits.cs
- PasswordRecoveryAutoFormat.cs
- BuildProvidersCompiler.cs
- CustomAttributeSerializer.cs
- NodeLabelEditEvent.cs
- RbTree.cs
- ProvidePropertyAttribute.cs
- WebServiceData.cs
- CustomAttribute.cs
- SrgsOneOf.cs
- UrlAuthorizationModule.cs
- XmlBinaryReader.cs
- SafeThreadHandle.cs
- PerfService.cs
- Quaternion.cs
- EditorPartCollection.cs
- ViewRendering.cs
- QilInvokeEarlyBound.cs
- HttpStreamMessageEncoderFactory.cs
- ByteAnimationBase.cs
- IPGlobalProperties.cs
- QueryOutputWriterV1.cs
- XmlTextWriter.cs
- Span.cs
- ToolStripSeparatorRenderEventArgs.cs
- TypeResolver.cs
- SqlUserDefinedTypeAttribute.cs
- TTSEngineTypes.cs
- ResourceExpression.cs
- EmptyQuery.cs
- WebHostedComPlusServiceHost.cs
- SoapObjectReader.cs
- PathTooLongException.cs
- ThreadInterruptedException.cs
- _ScatterGatherBuffers.cs
- FormView.cs
- ObjectQuery_EntitySqlExtensions.cs
- NumberFunctions.cs
- VisualBrush.cs
- SessionEndingCancelEventArgs.cs
- BitmapMetadata.cs
- ProcessHostConfigUtils.cs
- SystemWebSectionGroup.cs
- HtmlString.cs
- ServiceSecurityContext.cs
- Profiler.cs
- Highlights.cs
- TransformedBitmap.cs
- TableLayoutStyleCollection.cs
- AncestorChangedEventArgs.cs
- RuntimeCompatibilityAttribute.cs
- XmlSchemaAttributeGroup.cs
- AssemblyNameProxy.cs
- TypeInitializationException.cs
- PeerNameRecordCollection.cs
- PageFunction.cs
- IndexOutOfRangeException.cs
- Bold.cs
- RtType.cs
- RelationshipEndMember.cs
- AutomationElementCollection.cs
- Table.cs
- FacetValues.cs
- VectorAnimationUsingKeyFrames.cs
- CompilerTypeWithParams.cs
- AnimationTimeline.cs
- ListBindableAttribute.cs
- NamespaceListProperty.cs
- DBConnection.cs
- MessageProtectionOrder.cs
- ToolboxItemCollection.cs
- EntityFrameworkVersions.cs
- ExpressionsCollectionEditor.cs
- DynamicHyperLink.cs
- GridViewRowEventArgs.cs
- HexParser.cs
- SymbolMethod.cs
- TypeNameConverter.cs
- HotSpot.cs
- SecureEnvironment.cs
- ExpressionBuilder.cs
- WorkflowInstance.cs
- SignatureConfirmationElement.cs
- QilDataSource.cs
- XpsS0ValidatingLoader.cs
- DesignUtil.cs
- MetabaseServerConfig.cs
- VisualTreeHelper.cs
- PersistenceTask.cs
- xml.cs
- CodePageEncoding.cs
- BaseDataBoundControl.cs