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
- ArrayConverter.cs
- ADMembershipUser.cs
- _UriTypeConverter.cs
- Transform3D.cs
- CodeTypeReferenceCollection.cs
- CustomPopupPlacement.cs
- WebPartDeleteVerb.cs
- NumberFormatInfo.cs
- BaseDataBoundControl.cs
- FieldToken.cs
- ProtocolsConfiguration.cs
- FormParameter.cs
- _RequestCacheProtocol.cs
- AppDomainFactory.cs
- TypeRestriction.cs
- ComPlusDiagnosticTraceSchemas.cs
- ByteStack.cs
- InternalEnumValidator.cs
- ReadOnlyTernaryTree.cs
- OutOfProcStateClientManager.cs
- IndentedTextWriter.cs
- DecoratedNameAttribute.cs
- PolyLineSegmentFigureLogic.cs
- FixedSOMSemanticBox.cs
- ContainerFilterService.cs
- ObsoleteAttribute.cs
- CodeDesigner.cs
- CipherData.cs
- ByteStack.cs
- Ipv6Element.cs
- autovalidator.cs
- StringComparer.cs
- TreeNodeEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- WsdlImporterElementCollection.cs
- DeviceContext.cs
- CategoryNameCollection.cs
- Automation.cs
- StructuredTypeEmitter.cs
- HandleCollector.cs
- WinEventHandler.cs
- SolidBrush.cs
- RequestCachingSection.cs
- StringCollectionMarkupSerializer.cs
- Vector3DValueSerializer.cs
- AbsoluteQuery.cs
- Geometry.cs
- LineServicesRun.cs
- ResourceContainerWrapper.cs
- ConfigDefinitionUpdates.cs
- FreezableCollection.cs
- Stack.cs
- ChameleonKey.cs
- UnsafePeerToPeerMethods.cs
- WebPartConnectionCollection.cs
- TemplateBindingExpression.cs
- StringWriter.cs
- SpecialNameAttribute.cs
- StrokeNodeOperations.cs
- ApplicationInfo.cs
- WaveHeader.cs
- SecurityUtils.cs
- EventRecord.cs
- DataSourceXmlSubItemAttribute.cs
- MetaChildrenColumn.cs
- InfoCardKeyedHashAlgorithm.cs
- Mutex.cs
- BaseTemplateCodeDomTreeGenerator.cs
- InternalResources.cs
- ManipulationLogic.cs
- ColorTranslator.cs
- clipboard.cs
- RegistrationServices.cs
- ArrangedElementCollection.cs
- BinaryNode.cs
- TcpStreams.cs
- SystemInformation.cs
- ComponentEditorForm.cs
- Atom10FormatterFactory.cs
- StylusShape.cs
- XmlDomTextWriter.cs
- ListViewTableRow.cs
- HtmlLiteralTextAdapter.cs
- ConfigurationManagerInternalFactory.cs
- SmiEventSink.cs
- InstanceDescriptor.cs
- CompositeControl.cs
- XmlIlVisitor.cs
- EFDataModelProvider.cs
- RowToParametersTransformer.cs
- SiteMapPathDesigner.cs
- Win32Native.cs
- QilPatternFactory.cs
- StringStorage.cs
- RelationshipConverter.cs
- FileNameEditor.cs
- XmlSubtreeReader.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XmlSchemaExternal.cs
- Filter.cs