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
- sqlstateclientmanager.cs
- WebPartHelpVerb.cs
- WebBrowserSiteBase.cs
- ExtendLockAsyncResult.cs
- ParserOptions.cs
- MethodToken.cs
- ToolStripItemTextRenderEventArgs.cs
- SetStoryboardSpeedRatio.cs
- NavigationFailedEventArgs.cs
- XmlSchemaObjectTable.cs
- ClientScriptManagerWrapper.cs
- FactoryId.cs
- ResourceContainer.cs
- XmlReflectionMember.cs
- SafeThemeHandle.cs
- Pair.cs
- Pen.cs
- EdmItemCollection.cs
- CodePageEncoding.cs
- sqlstateclientmanager.cs
- EditingCoordinator.cs
- StringToken.cs
- SapiAttributeParser.cs
- AssociationTypeEmitter.cs
- IndexedDataBuffer.cs
- OneOfTypeConst.cs
- XamlHostingConfiguration.cs
- ResourcesChangeInfo.cs
- LocationReference.cs
- DataSet.cs
- SortQueryOperator.cs
- PrintSchema.cs
- TailCallAnalyzer.cs
- ClockController.cs
- JsonSerializer.cs
- IdentityValidationException.cs
- IRCollection.cs
- WebDisplayNameAttribute.cs
- FontStyles.cs
- HitTestParameters.cs
- XmlHelper.cs
- ExceptionHandlersDesigner.cs
- TypedReference.cs
- QueryInterceptorAttribute.cs
- Typeface.cs
- TagPrefixAttribute.cs
- ClearTypeHintValidation.cs
- DragCompletedEventArgs.cs
- MetaTableHelper.cs
- Border.cs
- TextEditor.cs
- DbSetClause.cs
- SByte.cs
- SortedDictionary.cs
- DataBindingCollection.cs
- FreeFormDragDropManager.cs
- WebPartChrome.cs
- DataGridSortCommandEventArgs.cs
- ContractType.cs
- TableCell.cs
- TextEffectCollection.cs
- CursorInteropHelper.cs
- ModuleConfigurationInfo.cs
- TickBar.cs
- MenuItemStyleCollection.cs
- SqlDuplicator.cs
- PropertyRef.cs
- Normalizer.cs
- FontResourceCache.cs
- ExpressionParser.cs
- DictionaryContent.cs
- MatrixTransform3D.cs
- DoubleAnimation.cs
- AttributeAction.cs
- CharacterShapingProperties.cs
- FunctionQuery.cs
- MultipartContentParser.cs
- AssemblyResourceLoader.cs
- FixedSOMFixedBlock.cs
- RenderingBiasValidation.cs
- SessionEndingCancelEventArgs.cs
- _HTTPDateParse.cs
- EnumBuilder.cs
- ColorConvertedBitmap.cs
- ActionItem.cs
- RuntimeHelpers.cs
- ToolStripSystemRenderer.cs
- CroppedBitmap.cs
- ZoneButton.cs
- DataServiceHost.cs
- EnumMemberAttribute.cs
- SynchronizedDispatch.cs
- _NtlmClient.cs
- MatrixKeyFrameCollection.cs
- Line.cs
- DataGridParentRows.cs
- HandleRef.cs
- BehaviorEditorPart.cs
- TransactionChannelListener.cs
- QuaternionAnimationUsingKeyFrames.cs