Code:
/ FX-1434 / FX-1434 / 1.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
- SendKeys.cs
- AssemblyBuilder.cs
- NamespaceList.cs
- XmlObjectSerializerContext.cs
- MenuItemBinding.cs
- BrowserCapabilitiesFactory.cs
- ZeroOpNode.cs
- UnsafeNativeMethods.cs
- Pointer.cs
- UnknownBitmapEncoder.cs
- AnchoredBlock.cs
- EntityKeyElement.cs
- InstanceKeyNotReadyException.cs
- AppearanceEditorPart.cs
- FixedSOMTableRow.cs
- SqlInternalConnectionSmi.cs
- RegexWriter.cs
- Emitter.cs
- PerfCounterSection.cs
- DocumentPageView.cs
- _StreamFramer.cs
- QilIterator.cs
- NativeMethodsCLR.cs
- Tile.cs
- NetCodeGroup.cs
- ConnectionInterfaceCollection.cs
- TextOnlyOutput.cs
- FontStretchConverter.cs
- ClientFormsAuthenticationCredentials.cs
- ApplicationId.cs
- HttpCookie.cs
- Debugger.cs
- ADMembershipProvider.cs
- columnmapfactory.cs
- FragmentQueryKB.cs
- ConnectionStringsExpressionBuilder.cs
- CfgRule.cs
- DeploymentExceptionMapper.cs
- GlobalProxySelection.cs
- ElementMarkupObject.cs
- CodeCommentStatement.cs
- TriggerBase.cs
- BooleanStorage.cs
- EmbeddedMailObject.cs
- HtmlForm.cs
- TdsRecordBufferSetter.cs
- KeyProperty.cs
- TransformValueSerializer.cs
- ByteFacetDescriptionElement.cs
- TagPrefixCollection.cs
- SequentialOutput.cs
- GenericEnumerator.cs
- FocusChangedEventArgs.cs
- TextDecorationCollectionConverter.cs
- WrappingXamlSchemaContext.cs
- PageAsyncTask.cs
- FontDifferentiator.cs
- FtpRequestCacheValidator.cs
- SqlProviderManifest.cs
- Visitor.cs
- PolicyValidationException.cs
- Pointer.cs
- GraphicsPath.cs
- GradientSpreadMethodValidation.cs
- HtmlInputCheckBox.cs
- CollectionChangeEventArgs.cs
- GeometryValueSerializer.cs
- ResourceWriter.cs
- WorkflowInstanceExtensionManager.cs
- AutomationPropertyInfo.cs
- SqlRetyper.cs
- ToolBar.cs
- _SecureChannel.cs
- HMACRIPEMD160.cs
- RadioButtonRenderer.cs
- DataGridViewCellMouseEventArgs.cs
- CodeNamespace.cs
- FileReader.cs
- CertificateManager.cs
- WebBrowserHelper.cs
- CodeArrayCreateExpression.cs
- HandlerWithFactory.cs
- CounterSampleCalculator.cs
- Stacktrace.cs
- TreeNodeCollectionEditor.cs
- DetailsViewActionList.cs
- DbProviderFactories.cs
- DesignBinding.cs
- PrePrepareMethodAttribute.cs
- MappedMetaModel.cs
- InkCanvasInnerCanvas.cs
- DictionaryManager.cs
- Win32Native.cs
- PathFigure.cs
- ComboBoxItem.cs
- PeerNameResolver.cs
- DrawListViewColumnHeaderEventArgs.cs
- SHA512CryptoServiceProvider.cs
- ProviderCollection.cs
- HttpModuleActionCollection.cs