Code:
/ FX-1434 / FX-1434 / 1.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
- ParseHttpDate.cs
- _ScatterGatherBuffers.cs
- MatrixAnimationUsingKeyFrames.cs
- Latin1Encoding.cs
- QuaternionRotation3D.cs
- CompositeActivityDesigner.cs
- UrlAuthorizationModule.cs
- ImageEditor.cs
- AuthorizationRuleCollection.cs
- StyleSelector.cs
- ToolStripControlHost.cs
- XmlFormatWriterGenerator.cs
- ReverseInheritProperty.cs
- ImportDesigner.xaml.cs
- TreeNodeEventArgs.cs
- SqlProviderUtilities.cs
- SqlErrorCollection.cs
- DataRelation.cs
- AuthenticationException.cs
- SchemaType.cs
- BooleanFunctions.cs
- Int16Converter.cs
- MultiBinding.cs
- OdbcErrorCollection.cs
- TreeNodeStyle.cs
- LinqDataSourceView.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- SafeProcessHandle.cs
- Int32RectValueSerializer.cs
- ExpandedWrapper.cs
- SqlPersonalizationProvider.cs
- DetailsViewActionList.cs
- DateTimeOffset.cs
- RequestNavigateEventArgs.cs
- EntityViewContainer.cs
- XPathDocument.cs
- EdmToObjectNamespaceMap.cs
- IsolatedStorageFileStream.cs
- QueryConverter.cs
- Column.cs
- DelayDesigner.cs
- BamlMapTable.cs
- TypeInitializationException.cs
- CardSpacePolicyElement.cs
- EdmFunction.cs
- FrameworkContentElementAutomationPeer.cs
- SafeNativeMethodsMilCoreApi.cs
- ExceptionUtil.cs
- SafeNativeMethodsCLR.cs
- NotifyParentPropertyAttribute.cs
- Site.cs
- HttpApplicationFactory.cs
- DbException.cs
- StreamWithDictionary.cs
- RemotingConfigParser.cs
- ObjectContextServiceProvider.cs
- SafeViewOfFileHandle.cs
- HtmlSelect.cs
- AddInAdapter.cs
- CodeCommentStatement.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SvcMapFile.cs
- SchemaMerger.cs
- ParameterExpression.cs
- FixedTextView.cs
- SessionStateContainer.cs
- MaterialGroup.cs
- MimeMultiPart.cs
- DataGridViewSortCompareEventArgs.cs
- GeometryGroup.cs
- SqlCaseSimplifier.cs
- updateconfighost.cs
- WebPartAddingEventArgs.cs
- PrintPreviewDialog.cs
- MergeLocalizationDirectives.cs
- IndexedGlyphRun.cs
- WindowPattern.cs
- TabItemAutomationPeer.cs
- ToolboxItemFilterAttribute.cs
- WebAdminConfigurationHelper.cs
- _SslSessionsCache.cs
- MatrixConverter.cs
- PathSegment.cs
- WebPartVerb.cs
- CornerRadius.cs
- DocumentPage.cs
- LinqDataSource.cs
- _TLSstream.cs
- SchemaManager.cs
- HtmlInputControl.cs
- AlignmentYValidation.cs
- FontNamesConverter.cs
- NavigationFailedEventArgs.cs
- FontNamesConverter.cs
- webeventbuffer.cs
- SiteMapPath.cs
- DrawListViewSubItemEventArgs.cs
- WinCategoryAttribute.cs
- serverconfig.cs
- DispatchChannelSink.cs