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
- ReadOnlyState.cs
- PenContexts.cs
- TextFormatterContext.cs
- FixedSOMTableRow.cs
- UrlMappingsModule.cs
- DataServiceRequestException.cs
- FileClassifier.cs
- XmlSchemaSequence.cs
- SerialReceived.cs
- UnmanagedMemoryStreamWrapper.cs
- HtmlTableCell.cs
- RepeatButtonAutomationPeer.cs
- ProfileSettingsCollection.cs
- BuildProvidersCompiler.cs
- RadialGradientBrush.cs
- DoubleCollectionValueSerializer.cs
- MailMessage.cs
- BinaryObjectWriter.cs
- IntegerValidatorAttribute.cs
- WebBrowserNavigatingEventHandler.cs
- CheckBoxField.cs
- EventLogHandle.cs
- DataTableTypeConverter.cs
- WebEventCodes.cs
- TableParaClient.cs
- RequestCacheManager.cs
- HWStack.cs
- HuffmanTree.cs
- TextEditorParagraphs.cs
- TextServicesLoader.cs
- UnsafeNativeMethods.cs
- Control.cs
- SqlGatherConsumedAliases.cs
- WebColorConverter.cs
- CatalogZoneBase.cs
- ReplacementText.cs
- TypeFieldSchema.cs
- ProfileSection.cs
- PreservationFileReader.cs
- InfiniteTimeSpanConverter.cs
- DoubleCollectionConverter.cs
- InheritanceService.cs
- ApplicationProxyInternal.cs
- RewritingSimplifier.cs
- AssemblyAssociatedContentFileAttribute.cs
- InvalidWMPVersionException.cs
- CacheMode.cs
- AstNode.cs
- DataServiceProviderMethods.cs
- TouchEventArgs.cs
- ExecutionEngineException.cs
- ISFTagAndGuidCache.cs
- XmlNode.cs
- StaticSiteMapProvider.cs
- SerializationEventsCache.cs
- OdbcConnectionString.cs
- UnionCodeGroup.cs
- UnknownWrapper.cs
- HttpProxyTransportBindingElement.cs
- DataGridLinkButton.cs
- EventLogPermissionAttribute.cs
- newinstructionaction.cs
- TextFormatterContext.cs
- MenuCommandService.cs
- SortDescriptionCollection.cs
- SqlTriggerAttribute.cs
- Rect3D.cs
- WebPartTransformerCollection.cs
- RuleSettings.cs
- DropAnimation.xaml.cs
- DiscardableAttribute.cs
- TreeViewImageKeyConverter.cs
- RemoteWebConfigurationHostServer.cs
- BitFlagsGenerator.cs
- InvalidPrinterException.cs
- ProxyWebPart.cs
- NetworkStream.cs
- FontSource.cs
- ColorIndependentAnimationStorage.cs
- ProfileGroupSettingsCollection.cs
- InstanceDataCollectionCollection.cs
- PiiTraceSource.cs
- PageThemeBuildProvider.cs
- WorkerRequest.cs
- TTSVoice.cs
- _DisconnectOverlappedAsyncResult.cs
- CapabilitiesUse.cs
- Compilation.cs
- RequestCacheEntry.cs
- Transform.cs
- Parser.cs
- DSACryptoServiceProvider.cs
- XPathNavigatorKeyComparer.cs
- Transactions.cs
- ObjectViewFactory.cs
- StylusPointPropertyUnit.cs
- TargetFrameworkAttribute.cs
- AppSettingsSection.cs
- ActivityDesignerLayoutSerializers.cs
- WindowsContainer.cs