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
- KeyTimeConverter.cs
- SettingsPropertyIsReadOnlyException.cs
- SoapIncludeAttribute.cs
- Stream.cs
- Int16AnimationBase.cs
- XmlNamespaceMapping.cs
- TableItemStyle.cs
- StickyNote.cs
- ReservationCollection.cs
- PrinterResolution.cs
- AlphaSortedEnumConverter.cs
- LinkDescriptor.cs
- TiffBitmapEncoder.cs
- JoinTreeNode.cs
- DelegatingTypeDescriptionProvider.cs
- MessageHeaderAttribute.cs
- WorkflowApplicationTerminatedException.cs
- VectorKeyFrameCollection.cs
- BrowserTree.cs
- ImmutableObjectAttribute.cs
- OleDbInfoMessageEvent.cs
- StringSource.cs
- _CommandStream.cs
- DefaultParameterValueAttribute.cs
- SoapElementAttribute.cs
- ProfileSettingsCollection.cs
- DataGridViewTextBoxEditingControl.cs
- ProgressBar.cs
- WindowProviderWrapper.cs
- BindToObject.cs
- HwndProxyElementProvider.cs
- ApplicationCommands.cs
- ScriptHandlerFactory.cs
- XmlWriter.cs
- TypeExtensionConverter.cs
- HttpWrapper.cs
- SiteMapDataSource.cs
- ToolStripSettings.cs
- HtmlHistory.cs
- RedistVersionInfo.cs
- ObjectSpanRewriter.cs
- Switch.cs
- SqlRewriteScalarSubqueries.cs
- CompositeCollection.cs
- HwndMouseInputProvider.cs
- SrgsSemanticInterpretationTag.cs
- _ConnectOverlappedAsyncResult.cs
- XmlException.cs
- DataKeyArray.cs
- Helpers.cs
- ArgumentNullException.cs
- DataSourceCacheDurationConverter.cs
- InputMethod.cs
- Utility.cs
- PeerApplication.cs
- ServiceRoute.cs
- GridViewSortEventArgs.cs
- TextEditorLists.cs
- RowBinding.cs
- TraceData.cs
- ButtonBaseAdapter.cs
- OdbcInfoMessageEvent.cs
- IisTraceListener.cs
- CqlLexer.cs
- X500Name.cs
- DataGridViewIntLinkedList.cs
- InstanceLockTracking.cs
- ComEventsHelper.cs
- SmiEventSink.cs
- GenericTypeParameterBuilder.cs
- SymLanguageType.cs
- dbenumerator.cs
- XamlWriter.cs
- RegexCapture.cs
- HiddenField.cs
- ImportFileRequest.cs
- FaultContractInfo.cs
- UnsettableComboBox.cs
- DbConnectionPoolIdentity.cs
- CodeGroup.cs
- ForeignKeyConstraint.cs
- FormsAuthentication.cs
- XsltConvert.cs
- WaitForChangedResult.cs
- EditorPartCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- PrinterSettings.cs
- CodeAccessSecurityEngine.cs
- OleDbStruct.cs
- TypeSemantics.cs
- CompilerResults.cs
- ContainerSelectorActiveEvent.cs
- CompilationRelaxations.cs
- FixUp.cs
- XmlSchemaGroup.cs
- DeviceFiltersSection.cs
- wgx_render.cs
- SizeAnimationUsingKeyFrames.cs
- WindowsFormsHost.cs
- TreeViewAutomationPeer.cs