Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AnnotationAuthorChangedEventArgs.cs
- SchemaConstraints.cs
- Win32Native.cs
- CommandSet.cs
- VirtualPathUtility.cs
- FormatSettings.cs
- XPSSignatureDefinition.cs
- TextRenderingModeValidation.cs
- PolyBezierSegmentFigureLogic.cs
- pingexception.cs
- IIS7UserPrincipal.cs
- InertiaRotationBehavior.cs
- DrawingImage.cs
- PolicyUtility.cs
- DataRelationPropertyDescriptor.cs
- TreeNodeStyle.cs
- TextTreeTextNode.cs
- Annotation.cs
- GroupItemAutomationPeer.cs
- ContextBase.cs
- PageVisual.cs
- ToolStripContainer.cs
- ToolStripDropTargetManager.cs
- CheckBox.cs
- Registry.cs
- FixedSOMPageConstructor.cs
- ISAPIWorkerRequest.cs
- ArrangedElement.cs
- MenuItemCollection.cs
- CssStyleCollection.cs
- HttpCookie.cs
- WebZone.cs
- XmlDataContract.cs
- ZeroOpNode.cs
- BitmapEffectOutputConnector.cs
- EntityDescriptor.cs
- _BufferOffsetSize.cs
- HorizontalAlignConverter.cs
- TabPage.cs
- RootDesignerSerializerAttribute.cs
- ResourceProviderFactory.cs
- DataGrid.cs
- SQLInt32.cs
- DecoderReplacementFallback.cs
- SecureUICommand.cs
- OdbcDataReader.cs
- SvcMapFile.cs
- WmlValidatorAdapter.cs
- SettingsPropertyCollection.cs
- XmlArrayItemAttribute.cs
- MdiWindowListStrip.cs
- AppAction.cs
- EncoderBestFitFallback.cs
- DataGridViewTextBoxCell.cs
- _ServiceNameStore.cs
- _FtpDataStream.cs
- HttpModuleActionCollection.cs
- Permission.cs
- InstanceStore.cs
- CodeDOMUtility.cs
- PrivateFontCollection.cs
- TextRangeSerialization.cs
- DefaultMemberAttribute.cs
- TrustSection.cs
- ListView.cs
- ProcessHost.cs
- X509Utils.cs
- DataObjectMethodAttribute.cs
- DataServiceBuildProvider.cs
- Transform.cs
- WasHttpModulesInstallComponent.cs
- MailDefinition.cs
- METAHEADER.cs
- Transform.cs
- SpeechSynthesizer.cs
- ArgIterator.cs
- MailAddressCollection.cs
- LocatorPart.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- _CookieModule.cs
- TransportationConfigurationTypeInstallComponent.cs
- WindowsGraphicsWrapper.cs
- UIElement3D.cs
- ItemsControl.cs
- ImpersonationContext.cs
- DiscoveryDocumentSerializer.cs
- COM2TypeInfoProcessor.cs
- MediaEntryAttribute.cs
- ManifestResourceInfo.cs
- smtppermission.cs
- TextElementEnumerator.cs
- CurrentTimeZone.cs
- HttpFormatExtensions.cs
- ProfileProvider.cs
- LocatorPart.cs
- ListMarkerSourceInfo.cs
- SelectorItemAutomationPeer.cs
- LineServices.cs
- AutomationPropertyInfo.cs
- SettingsPropertyNotFoundException.cs