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
- Pair.cs
- SynchronizationValidator.cs
- UnsafeNativeMethodsPenimc.cs
- WindowsListViewScroll.cs
- EncryptedPackageFilter.cs
- GroupItem.cs
- IListConverters.cs
- CheckBoxFlatAdapter.cs
- NameValuePair.cs
- TextServicesContext.cs
- CreateRefExpr.cs
- SessionState.cs
- OleDbReferenceCollection.cs
- IPAddressCollection.cs
- ValueUnavailableException.cs
- UIElementAutomationPeer.cs
- XmlBinaryWriter.cs
- FactoryMaker.cs
- ListControl.cs
- DesignTimeTemplateParser.cs
- FakeModelItemImpl.cs
- XmlSchemaNotation.cs
- sqlpipe.cs
- SecureEnvironment.cs
- FilterQueryOptionExpression.cs
- BamlReader.cs
- ObjectHandle.cs
- FixedDocumentSequencePaginator.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- DataError.cs
- ReadOnlyDictionary.cs
- SchemaCollectionPreprocessor.cs
- UInt32Converter.cs
- IndexOutOfRangeException.cs
- BackStopAuthenticationModule.cs
- DoubleAnimation.cs
- PageBorderless.cs
- Marshal.cs
- InstrumentationTracker.cs
- SessionState.cs
- ExcCanonicalXml.cs
- MergePropertyDescriptor.cs
- wmiprovider.cs
- HtmlInputButton.cs
- BitmapPalettes.cs
- QueryCursorEventArgs.cs
- KeyToListMap.cs
- MessageQueueConverter.cs
- SrgsText.cs
- DefaultPropertyAttribute.cs
- AlternateView.cs
- CloudCollection.cs
- SimpleExpression.cs
- RangeValidator.cs
- Transaction.cs
- Trace.cs
- CompoundFileStorageReference.cs
- OneOfConst.cs
- SequentialUshortCollection.cs
- PageCatalogPart.cs
- Scene3D.cs
- XmlQueryContext.cs
- DeviceContexts.cs
- FactoryGenerator.cs
- WindowsListViewGroup.cs
- DetailsViewAutoFormat.cs
- FixedTextView.cs
- InternalConfigRoot.cs
- DynamicActionMessageFilter.cs
- MarkupExtensionParser.cs
- ObjectDataSourceDisposingEventArgs.cs
- BuildProvidersCompiler.cs
- SqlMethodAttribute.cs
- TemplateBindingExtension.cs
- WebPartExportVerb.cs
- SerializerWriterEventHandlers.cs
- ObjectStateFormatter.cs
- InlineCollection.cs
- BehaviorService.cs
- DesignTimeHTMLTextWriter.cs
- HttpException.cs
- DispatcherOperation.cs
- TextOutput.cs
- HijriCalendar.cs
- ChildTable.cs
- XmlHierarchicalEnumerable.cs
- XMLUtil.cs
- FormViewDeleteEventArgs.cs
- FileDialogCustomPlace.cs
- CompletedAsyncResult.cs
- SqlCacheDependencyDatabase.cs
- Membership.cs
- PartitionResolver.cs
- PersistChildrenAttribute.cs
- ConfigurationPropertyAttribute.cs
- WebRequestModuleElement.cs
- ConnectionOrientedTransportChannelListener.cs
- MembershipValidatePasswordEventArgs.cs
- NameValuePair.cs
- BinaryFormatterWriter.cs