Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PixelFormats.cs
- EventHandlerService.cs
- ACL.cs
- NumericPagerField.cs
- ByteConverter.cs
- SkipQueryOptionExpression.cs
- PeerNameRecordCollection.cs
- ToolStripLocationCancelEventArgs.cs
- SqlProfileProvider.cs
- WebControlToolBoxItem.cs
- DataBinder.cs
- PriorityRange.cs
- BuildManagerHost.cs
- MaterialGroup.cs
- SByteStorage.cs
- PropertySegmentSerializationProvider.cs
- _SecureChannel.cs
- Parallel.cs
- XamlParser.cs
- GeneratedCodeAttribute.cs
- WpfXamlLoader.cs
- Options.cs
- CompilationRelaxations.cs
- WebServiceClientProxyGenerator.cs
- ConnectionPointConverter.cs
- MenuItem.cs
- TextServicesPropertyRanges.cs
- TableFieldsEditor.cs
- Int16.cs
- Scripts.cs
- FixedStringLookup.cs
- InputChannelAcceptor.cs
- ResourcePermissionBaseEntry.cs
- CodeCommentStatementCollection.cs
- RoutedEventValueSerializer.cs
- SoapSchemaMember.cs
- UserControl.cs
- Panel.cs
- XmlSchemaInfo.cs
- DbTransaction.cs
- ListViewSortEventArgs.cs
- MediaSystem.cs
- TextEffect.cs
- ElementsClipboardData.cs
- CookieParameter.cs
- TypeResolver.cs
- AndCondition.cs
- Marshal.cs
- Odbc32.cs
- Attributes.cs
- Hashtable.cs
- LockRecursionException.cs
- ScopelessEnumAttribute.cs
- ToolStripItemEventArgs.cs
- TaskFactory.cs
- XmlSchema.cs
- XmlDocumentType.cs
- TypefaceMap.cs
- BooleanAnimationBase.cs
- NavigationPropertyEmitter.cs
- QuerySettings.cs
- BooleanAnimationBase.cs
- StateMachineWorkflowDesigner.cs
- LambdaValue.cs
- CultureSpecificStringDictionary.cs
- Interlocked.cs
- Graphics.cs
- WindowsToolbarAsMenu.cs
- BackEase.cs
- CollectionType.cs
- WindowsComboBox.cs
- HtmlTextArea.cs
- ToolStripContainerActionList.cs
- DataMemberConverter.cs
- Brushes.cs
- MsmqTransportElement.cs
- EventManager.cs
- SHA1Managed.cs
- InstanceDescriptor.cs
- WindowsGraphicsWrapper.cs
- HtmlCommandAdapter.cs
- GestureRecognizer.cs
- OpCopier.cs
- X509Utils.cs
- ExceptionHandlerDesigner.cs
- DataGridLengthConverter.cs
- ImageField.cs
- SQLDoubleStorage.cs
- HyperlinkAutomationPeer.cs
- Vector3DCollectionConverter.cs
- ReadOnlyDictionary.cs
- ServiceCredentials.cs
- NavigationWindow.cs
- SiteMapNodeItem.cs
- MostlySingletonList.cs
- LineServicesRun.cs
- XmlCharCheckingReader.cs
- WebDescriptionAttribute.cs
- BindableTemplateBuilder.cs
- CallbackHandler.cs