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
- MetadataElement.cs
- LabelLiteral.cs
- ButtonBaseAdapter.cs
- InstanceContextMode.cs
- UnsafeNativeMethods.cs
- _DisconnectOverlappedAsyncResult.cs
- InheritanceContextHelper.cs
- unitconverter.cs
- Wizard.cs
- ExpressionBinding.cs
- Selector.cs
- HtmlLink.cs
- Substitution.cs
- EventLogQuery.cs
- WebControlParameterProxy.cs
- PngBitmapEncoder.cs
- GregorianCalendarHelper.cs
- SplashScreenNativeMethods.cs
- MultipleViewPattern.cs
- ViewSimplifier.cs
- MonthChangedEventArgs.cs
- TextStore.cs
- PathSegmentCollection.cs
- ProgressiveCrcCalculatingStream.cs
- CodeAccessSecurityEngine.cs
- MultipleViewPattern.cs
- GridViewRowPresenter.cs
- AsyncOperationManager.cs
- SerializationInfoEnumerator.cs
- JsonStringDataContract.cs
- CardSpaceException.cs
- AttributeXamlType.cs
- DynamicResourceExtensionConverter.cs
- QueryContinueDragEvent.cs
- PathGeometry.cs
- UserControl.cs
- HtmlWindow.cs
- StrongNameKeyPair.cs
- HtmlTableCell.cs
- BoundConstants.cs
- File.cs
- BStrWrapper.cs
- CacheMemory.cs
- ToolStripItemClickedEventArgs.cs
- XmlSchemaInferenceException.cs
- ForwardPositionQuery.cs
- ValidatingCollection.cs
- TimeEnumHelper.cs
- ArgumentValidation.cs
- GroupItemAutomationPeer.cs
- Glyph.cs
- WindowsHyperlink.cs
- SecurityPolicySection.cs
- EntityContainerRelationshipSetEnd.cs
- TextElementCollectionHelper.cs
- FloaterBaseParaClient.cs
- UIElementParagraph.cs
- PolyQuadraticBezierSegment.cs
- PointCollection.cs
- MailWebEventProvider.cs
- WindowsFormsEditorServiceHelper.cs
- InstalledFontCollection.cs
- ViewGenerator.cs
- IconEditor.cs
- ProfilePropertySettings.cs
- Span.cs
- TabControlCancelEvent.cs
- WSDualHttpSecurityElement.cs
- TabControlEvent.cs
- AddressUtility.cs
- ActivityDefaults.cs
- Pens.cs
- MetadataCollection.cs
- PerformanceCounterLib.cs
- AssociationTypeEmitter.cs
- ActivityExecutorDelegateInfo.cs
- CacheDependency.cs
- DeviceContext2.cs
- HtmlHead.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- XmlILTrace.cs
- HandledEventArgs.cs
- DecoderFallbackWithFailureFlag.cs
- Transform.cs
- CallbackValidatorAttribute.cs
- DateTimeConverter.cs
- RegexCompiler.cs
- KeyPullup.cs
- CommonProperties.cs
- InputBinding.cs
- EventToken.cs
- Primitive.cs
- EntityDataSourceQueryBuilder.cs
- GridErrorDlg.cs
- CannotUnloadAppDomainException.cs
- SourceChangedEventArgs.cs
- OperationResponse.cs
- Delay.cs
- VirtualizingPanel.cs
- TableLayoutSettingsTypeConverter.cs