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
- ImageInfo.cs
- Wildcard.cs
- TransactionFlowBindingElement.cs
- InteropExecutor.cs
- Vector3DValueSerializer.cs
- ExpressionBindingCollection.cs
- COM2Properties.cs
- ApplyTemplatesAction.cs
- SelectionRange.cs
- PreviewPageInfo.cs
- ReflectEventDescriptor.cs
- StringConverter.cs
- PrePostDescendentsWalker.cs
- Message.cs
- EdgeProfileValidation.cs
- MetadataPropertyvalue.cs
- QilLoop.cs
- WebPartMenuStyle.cs
- ConstructorNeedsTagAttribute.cs
- PersistenceTypeAttribute.cs
- HeaderUtility.cs
- StrokeCollection.cs
- Page.cs
- InfoCardMasterKey.cs
- SqlConnectionHelper.cs
- BitmapDownload.cs
- xml.cs
- ArrangedElementCollection.cs
- ResourcesBuildProvider.cs
- TextRangeEditLists.cs
- CodeSnippetStatement.cs
- CodeCastExpression.cs
- SQLBinaryStorage.cs
- CompressedStack.cs
- SqlGenericUtil.cs
- SqlWorkflowPersistenceService.cs
- ServerTooBusyException.cs
- ToolStripItemClickedEventArgs.cs
- DocumentPageHost.cs
- NumberFunctions.cs
- Typography.cs
- DocumentViewerHelper.cs
- PageParser.cs
- InternalConfigHost.cs
- PropertyMapper.cs
- AvtEvent.cs
- AdapterDictionary.cs
- SerializationFieldInfo.cs
- TokenDescriptor.cs
- BadImageFormatException.cs
- XmlSerializerOperationFormatter.cs
- MarkupObject.cs
- ObjectDataSourceSelectingEventArgs.cs
- MergablePropertyAttribute.cs
- SrgsRuleRef.cs
- EventManager.cs
- FtpWebResponse.cs
- XsdDataContractImporter.cs
- ScrollContentPresenter.cs
- TraceRecords.cs
- EncryptedKey.cs
- DockPanel.cs
- PartialCachingAttribute.cs
- DBNull.cs
- RtfFormatStack.cs
- WpfXamlMember.cs
- CommandField.cs
- Converter.cs
- QuadraticBezierSegment.cs
- ZoneMembershipCondition.cs
- XmlSchemaRedefine.cs
- ProgressBarHighlightConverter.cs
- FieldToken.cs
- TraceData.cs
- StorageInfo.cs
- TdsEnums.cs
- GlyphRun.cs
- NativeMethodsCLR.cs
- ExceptionValidationRule.cs
- ListManagerBindingsCollection.cs
- TransportListener.cs
- EntityContainerEntitySetDefiningQuery.cs
- HttpPostServerProtocol.cs
- LinkLabelLinkClickedEvent.cs
- RawKeyboardInputReport.cs
- XamlPoint3DCollectionSerializer.cs
- Switch.cs
- QualifiedCellIdBoolean.cs
- CodeTypeDeclarationCollection.cs
- QilGenerator.cs
- PermissionSetEnumerator.cs
- SynchronousReceiveElement.cs
- While.cs
- PointLightBase.cs
- ProviderBase.cs
- CodeParameterDeclarationExpression.cs
- SmiEventStream.cs
- ResourceManager.cs
- MetadataArtifactLoaderCompositeFile.cs
- OleDbPermission.cs