Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Reliability / ReliabilityContractAttribute.cs / 1305376 / 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. ** ** ===========================================================*/ namespace System.Runtime.ConstrainedExecution { using System.Runtime.InteropServices; using System; // ************************************************************************************************************************* // // 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. ** ** ===========================================================*/ namespace System.Runtime.ConstrainedExecution { using System.Runtime.InteropServices; using System; // ************************************************************************************************************************* // // 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
- TransformConverter.cs
- StylusEditingBehavior.cs
- WorkflowCompensationBehavior.cs
- RegexTree.cs
- MultiAsyncResult.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- ContractDescription.cs
- TrustManagerPromptUI.cs
- Int16AnimationBase.cs
- LoginCancelEventArgs.cs
- TableStyle.cs
- ClickablePoint.cs
- CacheDependency.cs
- NativeMethods.cs
- SwitchLevelAttribute.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- Stylesheet.cs
- remotingproxy.cs
- EntityDesignerUtils.cs
- StandardCommands.cs
- ArrayTypeMismatchException.cs
- ArraySegment.cs
- TdsParserSessionPool.cs
- SchemaEntity.cs
- RedistVersionInfo.cs
- FormsAuthenticationConfiguration.cs
- ObjectCache.cs
- DeferredReference.cs
- ResolveMatchesMessage11.cs
- DetailsViewInsertEventArgs.cs
- FormViewUpdatedEventArgs.cs
- InputLangChangeRequestEvent.cs
- WindowsButton.cs
- COM2IDispatchConverter.cs
- MSAAEventDispatcher.cs
- BoundField.cs
- LabelEditEvent.cs
- OpenTypeLayoutCache.cs
- EventLog.cs
- TextBoxBaseDesigner.cs
- Errors.cs
- HandledEventArgs.cs
- SafeCryptHandles.cs
- DiscreteKeyFrames.cs
- NamedPipeProcessProtocolHandler.cs
- Point3DCollection.cs
- XPathSelectionIterator.cs
- SectionVisual.cs
- DataGridViewCellStyleConverter.cs
- DeferredTextReference.cs
- ContainerUtilities.cs
- MarkupCompilePass1.cs
- CriticalFinalizerObject.cs
- ControlCodeDomSerializer.cs
- Column.cs
- StylusEditingBehavior.cs
- ISFTagAndGuidCache.cs
- TimelineGroup.cs
- ByteStreamGeometryContext.cs
- CompositionAdorner.cs
- XmlCharacterData.cs
- ClonableStack.cs
- SocketInformation.cs
- Parsers.cs
- FactoryMaker.cs
- ApplicationHost.cs
- DrawingVisualDrawingContext.cs
- ImageList.cs
- GenerateTemporaryTargetAssembly.cs
- SectionXmlInfo.cs
- LayoutEditorPart.cs
- BindableTemplateBuilder.cs
- EntryWrittenEventArgs.cs
- InputScopeAttribute.cs
- Point3DCollectionConverter.cs
- ProjectionPathBuilder.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ProtocolsInstallComponent.cs
- RecognizedAudio.cs
- BitmapEffect.cs
- XmlElement.cs
- TimeSpan.cs
- ContextQuery.cs
- _NativeSSPI.cs
- ShapingEngine.cs
- GatewayDefinition.cs
- MsiStyleLogWriter.cs
- DesignTimeDataBinding.cs
- COM2PictureConverter.cs
- BitmapEffect.cs
- XamlTemplateSerializer.cs
- NameValueConfigurationCollection.cs
- DiagnosticsConfigurationHandler.cs
- ConnectionManagementElement.cs
- TimeIntervalCollection.cs
- DataGridViewBand.cs
- StylusOverProperty.cs
- XamlDesignerSerializationManager.cs
- WindowsStreamSecurityElement.cs
- ToggleButtonAutomationPeer.cs