Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- wmiprovider.cs
- MediaTimeline.cs
- SqlCacheDependencyDatabaseCollection.cs
- InkPresenterAutomationPeer.cs
- XmlEntity.cs
- ToolStripContainer.cs
- CharUnicodeInfo.cs
- AttributeProviderAttribute.cs
- PageRanges.cs
- DbResourceAllocator.cs
- IsolatedStoragePermission.cs
- Duration.cs
- HandleCollector.cs
- CookieParameter.cs
- TypeLoadException.cs
- SqlRecordBuffer.cs
- AnnotationService.cs
- Module.cs
- SrgsRule.cs
- CacheChildrenQuery.cs
- WindowsEditBoxRange.cs
- SoapEnumAttribute.cs
- TypeConverter.cs
- RequestQueryParser.cs
- SerializationStore.cs
- CodeTypeMemberCollection.cs
- HtmlTitle.cs
- ToolConsole.cs
- ServiceBuildProvider.cs
- RequiredFieldValidator.cs
- DbConnectionStringBuilder.cs
- StrongNameKeyPair.cs
- BaseUriHelper.cs
- DocumentSequence.cs
- Timer.cs
- DesignerSerializationManager.cs
- COM2ComponentEditor.cs
- GPPOINTF.cs
- TaiwanLunisolarCalendar.cs
- DataStreams.cs
- SimpleTextLine.cs
- OlePropertyStructs.cs
- elementinformation.cs
- LinearKeyFrames.cs
- OutputCacheSettings.cs
- SQLInt64Storage.cs
- ContentPresenter.cs
- ColumnHeader.cs
- BasicViewGenerator.cs
- ConnectionInterfaceCollection.cs
- IdentityModelStringsVersion1.cs
- FacetValues.cs
- ItemCheckEvent.cs
- DrawTreeNodeEventArgs.cs
- IsolatedStorageFileStream.cs
- QilValidationVisitor.cs
- DecimalFormatter.cs
- WebPartDisplayModeCancelEventArgs.cs
- ComboBox.cs
- StylusPlugInCollection.cs
- RequiredFieldValidator.cs
- XmlDataProvider.cs
- AsymmetricAlgorithm.cs
- ConstructorBuilder.cs
- ColumnHeaderCollectionEditor.cs
- CategoryEditor.cs
- ProcessHostMapPath.cs
- AnimatedTypeHelpers.cs
- ListViewUpdatedEventArgs.cs
- RowToFieldTransformer.cs
- RectangleHotSpot.cs
- ListParagraph.cs
- Identifier.cs
- OracleMonthSpan.cs
- ReadingWritingEntityEventArgs.cs
- TileModeValidation.cs
- ProcessInputEventArgs.cs
- ToolBarButtonClickEvent.cs
- ScrollProviderWrapper.cs
- DataGridRowHeaderAutomationPeer.cs
- ConfigurationConverterBase.cs
- FileLogRecordStream.cs
- ExtenderProvidedPropertyAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- SchemaCompiler.cs
- StylusPoint.cs
- ExpressionLink.cs
- MissingManifestResourceException.cs
- AnnotationResource.cs
- QueryStringParameter.cs
- MappingException.cs
- Profiler.cs
- XmlLinkedNode.cs
- SymbolPair.cs
- VarRemapper.cs
- MetadataCollection.cs
- EntityReference.cs
- ApplicationException.cs
- AuthenticationServiceManager.cs
- XPathNode.cs