Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KnownTypesProvider.cs
- PageContentCollection.cs
- ProbeMatchesMessageCD1.cs
- TemplateFactory.cs
- ApplicationSettingsBase.cs
- XmlSchemaGroup.cs
- HtmlInputControl.cs
- RealizationContext.cs
- ImageListStreamer.cs
- WebConfigurationHostFileChange.cs
- TypographyProperties.cs
- HttpInputStream.cs
- XamlTypeWithExplicitNamespace.cs
- StoragePropertyMapping.cs
- QuaternionRotation3D.cs
- GlyphRun.cs
- ResourcePermissionBaseEntry.cs
- TaskCanceledException.cs
- TextServicesProperty.cs
- JumpTask.cs
- SoapSchemaExporter.cs
- SegmentInfo.cs
- RowToParametersTransformer.cs
- SetterBase.cs
- TextSearch.cs
- SortQueryOperator.cs
- _HTTPDateParse.cs
- HiddenField.cs
- NamespaceList.cs
- ProgressiveCrcCalculatingStream.cs
- elementinformation.cs
- PartialArray.cs
- ToolStripControlHost.cs
- EdmToObjectNamespaceMap.cs
- FigureParaClient.cs
- Soap11ServerProtocol.cs
- ClientType.cs
- CombinedGeometry.cs
- ProgressBarAutomationPeer.cs
- ActionFrame.cs
- ValueUtilsSmi.cs
- CodeGroup.cs
- AnnotationHighlightLayer.cs
- DesignerInterfaces.cs
- TransformGroup.cs
- DataGridCellEditEndingEventArgs.cs
- ParseHttpDate.cs
- UpdateTranslator.cs
- NamespaceInfo.cs
- CellPartitioner.cs
- XMLSchema.cs
- ControlBuilder.cs
- HttpWrapper.cs
- ContainerParaClient.cs
- NavigationCommands.cs
- KerberosSecurityTokenProvider.cs
- WindowInteropHelper.cs
- DataControlImageButton.cs
- SessionStateUtil.cs
- BitmapEffectGroup.cs
- DataPagerCommandEventArgs.cs
- FunctionNode.cs
- DtdParser.cs
- DataListCommandEventArgs.cs
- AssociationSetMetadata.cs
- WebHttpSecurity.cs
- SchemaElementLookUpTable.cs
- EventBuilder.cs
- StreamGeometry.cs
- RayMeshGeometry3DHitTestResult.cs
- StatusBarDrawItemEvent.cs
- ToolStripContentPanel.cs
- ConfigurationPropertyAttribute.cs
- EtwTrackingBehaviorElement.cs
- RichTextBox.cs
- RecognitionResult.cs
- TableLayoutCellPaintEventArgs.cs
- OrderedDictionary.cs
- CultureInfo.cs
- SettingsProviderCollection.cs
- XmlReader.cs
- EditorPartChrome.cs
- ExecutedRoutedEventArgs.cs
- SettingsPropertyWrongTypeException.cs
- AdRotator.cs
- SqlClientMetaDataCollectionNames.cs
- RtType.cs
- Pkcs7Signer.cs
- ToolboxItemCollection.cs
- ContentFilePart.cs
- TableRow.cs
- BaseCollection.cs
- XNodeNavigator.cs
- SectionInput.cs
- Utils.cs
- ProxyWebPartManager.cs
- OletxVolatileEnlistment.cs
- EventBuilder.cs
- RectAnimation.cs
- FileAuthorizationModule.cs