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
- VersionPair.cs
- ListManagerBindingsCollection.cs
- MaskPropertyEditor.cs
- DeclarationUpdate.cs
- GACIdentityPermission.cs
- ValidationErrorCollection.cs
- Executor.cs
- ArrayConverter.cs
- ReflectionUtil.cs
- Color.cs
- DefaultParameterValueAttribute.cs
- PersonalizationStateInfo.cs
- DataContractSerializer.cs
- RequestUriProcessor.cs
- XmlDocumentType.cs
- ComponentResourceKeyConverter.cs
- ScrollItemPattern.cs
- DesignerActionGlyph.cs
- RefreshResponseInfo.cs
- ScrollableControl.cs
- SByte.cs
- Win32SafeHandles.cs
- Attachment.cs
- EmptyControlCollection.cs
- WinOEToolBoxItem.cs
- Point4D.cs
- CodeMemberMethod.cs
- SerializationSectionGroup.cs
- SelectionGlyphBase.cs
- HotSpotCollection.cs
- WindowsPrincipal.cs
- BitmapEffectInput.cs
- BindingExpression.cs
- SpecialFolderEnumConverter.cs
- StructuralObject.cs
- RuleSettingsCollection.cs
- TraceEventCache.cs
- WebPartMenu.cs
- WinEventWrap.cs
- TypeUnloadedException.cs
- AppDomainManager.cs
- ItemAutomationPeer.cs
- RequiredArgumentAttribute.cs
- CheckBoxStandardAdapter.cs
- ProjectionPlanCompiler.cs
- IgnoreSectionHandler.cs
- WebPartAuthorizationEventArgs.cs
- NameGenerator.cs
- MediaCommands.cs
- RootBrowserWindowAutomationPeer.cs
- DefaultTextStoreTextComposition.cs
- MtomMessageEncoder.cs
- ComponentEditorPage.cs
- ObjectQueryExecutionPlan.cs
- CompressStream.cs
- EventLogReader.cs
- DesignerDataTableBase.cs
- CheckBoxRenderer.cs
- StylusPointPropertyInfoDefaults.cs
- AndAlso.cs
- DeviceSpecificDialogCachedState.cs
- PartialTrustHelpers.cs
- GlobalEventManager.cs
- MetadataCache.cs
- FixedHighlight.cs
- DesignerTransaction.cs
- BoundColumn.cs
- Bitmap.cs
- ConfigurationException.cs
- XmlSortKey.cs
- OdbcParameterCollection.cs
- XPathChildIterator.cs
- SQLInt16.cs
- ConsumerConnectionPoint.cs
- SelectionEditingBehavior.cs
- WindowClosedEventArgs.cs
- AxisAngleRotation3D.cs
- DesignSurfaceServiceContainer.cs
- ApplicationServiceManager.cs
- ProcessModelInfo.cs
- ValidationErrorEventArgs.cs
- FindResponse.cs
- PropertyOverridesTypeEditor.cs
- GridViewRowEventArgs.cs
- ListViewCommandEventArgs.cs
- TextPattern.cs
- ConnectorDragDropGlyph.cs
- QilExpression.cs
- MenuItemBinding.cs
- dataprotectionpermission.cs
- BodyGlyph.cs
- XPathNavigatorReader.cs
- ListItemCollection.cs
- DataKeyArray.cs
- Common.cs
- FrameworkElementFactoryMarkupObject.cs
- sqlcontext.cs
- LogicalTreeHelper.cs
- TTSEvent.cs
- SendSecurityHeaderElement.cs