Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Runtime / Reliability / ReliabilityContractAttribute.cs / 2 / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEncodedRawTextWriter.cs
- DataFormat.cs
- HtmlGenericControl.cs
- VersionPair.cs
- ExtenderControl.cs
- RawStylusInputReport.cs
- ToolStripDropDownButton.cs
- GridViewRowCollection.cs
- EventBookmark.cs
- TextServicesLoader.cs
- ParameterCollection.cs
- WindowsListViewGroup.cs
- HeaderedContentControl.cs
- SupportingTokenAuthenticatorSpecification.cs
- HMACSHA512.cs
- LineUtil.cs
- isolationinterop.cs
- PageBreakRecord.cs
- Metadata.cs
- X509SecurityTokenAuthenticator.cs
- BamlLocalizableResourceKey.cs
- EndpointAddress10.cs
- SqlMethodTransformer.cs
- TableLayoutRowStyleCollection.cs
- UserControlFileEditor.cs
- ScriptControlManager.cs
- ConfigXmlText.cs
- TableCellCollection.cs
- NumberFormatter.cs
- CodePrimitiveExpression.cs
- ConditionalBranch.cs
- ResourceReferenceKeyNotFoundException.cs
- StoreConnection.cs
- HttpCapabilitiesBase.cs
- TimeSpanValidatorAttribute.cs
- ServicePoint.cs
- ObjRef.cs
- CompilerState.cs
- ContainerParaClient.cs
- ExpressionNormalizer.cs
- CatalogPart.cs
- State.cs
- VisualBrush.cs
- Transform3D.cs
- _AcceptOverlappedAsyncResult.cs
- StateBag.cs
- BindUriHelper.cs
- GatewayIPAddressInformationCollection.cs
- BmpBitmapEncoder.cs
- ServiceModelPerformanceCounters.cs
- ImageMetadata.cs
- StringComparer.cs
- AllowedAudienceUriElement.cs
- DeclaredTypeElementCollection.cs
- GridSplitterAutomationPeer.cs
- UInt32Converter.cs
- HandleExceptionArgs.cs
- OletxTransactionHeader.cs
- DelegateSerializationHolder.cs
- updateconfighost.cs
- StorageMappingFragment.cs
- Delegate.cs
- DataServiceProviderMethods.cs
- autovalidator.cs
- SqlDataSourceSelectingEventArgs.cs
- Brush.cs
- FilteredDataSetHelper.cs
- SerializationStore.cs
- UInt64Converter.cs
- JsonWriter.cs
- XmlRawWriterWrapper.cs
- DataViewManagerListItemTypeDescriptor.cs
- UrlParameterWriter.cs
- BaseResourcesBuildProvider.cs
- DataContractSerializer.cs
- ServiceDescriptionImporter.cs
- BorderGapMaskConverter.cs
- SafeReadContext.cs
- DbConnectionPoolGroupProviderInfo.cs
- EntityTransaction.cs
- TextDecorationCollection.cs
- PlacementWorkspace.cs
- EntityContainerRelationshipSetEnd.cs
- StateChangeEvent.cs
- pingexception.cs
- TimeIntervalCollection.cs
- TextFormatter.cs
- WebPartExportVerb.cs
- _UriTypeConverter.cs
- AlphabetConverter.cs
- SourceElementsCollection.cs
- MasterPageParser.cs
- SiteMapDesignerDataSourceView.cs
- TreeBuilder.cs
- AdvancedBindingPropertyDescriptor.cs
- DecoderNLS.cs
- CachedFontFace.cs
- DeferredElementTreeState.cs
- TypeConverterBase.cs
- Grant.cs