Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- InputReport.cs
- MappingItemCollection.cs
- QilExpression.cs
- DataMisalignedException.cs
- SystemInfo.cs
- FileClassifier.cs
- Stylus.cs
- ExpressionParser.cs
- SqlServer2KCompatibilityCheck.cs
- ResourceKey.cs
- WorkflowRuntimeElement.cs
- ArgumentOutOfRangeException.cs
- URI.cs
- DecimalAnimation.cs
- _ShellExpression.cs
- UnsafeNativeMethods.cs
- QuaternionKeyFrameCollection.cs
- MailSettingsSection.cs
- TTSEngineTypes.cs
- TextBoxDesigner.cs
- RefreshEventArgs.cs
- RC2.cs
- SuppressIldasmAttribute.cs
- DateTimeUtil.cs
- TemplateInstanceAttribute.cs
- IPipelineRuntime.cs
- RSAPKCS1SignatureFormatter.cs
- HttpCachePolicy.cs
- SmuggledIUnknown.cs
- SmiMetaData.cs
- SchemaExporter.cs
- SqlResolver.cs
- QueryBranchOp.cs
- Int64AnimationBase.cs
- ExtendedPropertiesHandler.cs
- FileUpload.cs
- HostExecutionContextManager.cs
- RelatedPropertyManager.cs
- ColorConverter.cs
- ImageAnimator.cs
- XmlWriterSettings.cs
- ChangePassword.cs
- BoundField.cs
- TaskDesigner.cs
- PrefixQName.cs
- TemplateControlBuildProvider.cs
- FixedHighlight.cs
- TextServicesContext.cs
- SafeRightsManagementHandle.cs
- TargetInvocationException.cs
- Soap12FormatExtensions.cs
- AssociationTypeEmitter.cs
- SmiSettersStream.cs
- BackgroundWorker.cs
- SerTrace.cs
- ConnectionManagementElement.cs
- ApplicationDirectoryMembershipCondition.cs
- VisualStyleTypesAndProperties.cs
- PropertyValueChangedEvent.cs
- AccessText.cs
- TemplateNameScope.cs
- MaskedTextBoxDesigner.cs
- CacheAxisQuery.cs
- RequestTimeoutManager.cs
- ContentPresenter.cs
- Internal.cs
- SoapIncludeAttribute.cs
- ValidatingPropertiesEventArgs.cs
- rsa.cs
- ReferencedCollectionType.cs
- Scheduling.cs
- TransformPatternIdentifiers.cs
- Path.cs
- Internal.cs
- PropagatorResult.cs
- DbBuffer.cs
- SinglePhaseEnlistment.cs
- ScriptResourceAttribute.cs
- TryCatchDesigner.xaml.cs
- DataGridViewTextBoxEditingControl.cs
- DataGridViewRowHeaderCell.cs
- TriggerBase.cs
- NodeInfo.cs
- Point.cs
- Clock.cs
- GifBitmapDecoder.cs
- JapaneseLunisolarCalendar.cs
- UrlAuthorizationModule.cs
- AnalyzedTree.cs
- PrintDocument.cs
- HelloOperationAsyncResult.cs
- ContentHostHelper.cs
- NativeWindow.cs
- PolyLineSegment.cs
- HttpUnhandledOperationInvoker.cs
- CrossSiteScriptingValidation.cs
- SimpleType.cs
- CallSite.cs
- XpsS0ValidatingLoader.cs
- Token.cs