Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / SinglePhaseEnlistment.cs / 1305376 / SinglePhaseEnlistment.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Transactions { using System; using System.Diagnostics; using System.Threading; using System.Transactions; using System.Transactions.Diagnostics; public class SinglePhaseEnlistment : Enlistment { internal SinglePhaseEnlistment( InternalEnlistment enlistment ) : base(enlistment) { } public void Aborted() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Aborted ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Aborted( this.internalEnlistment, null ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } } // Changing the e paramater name would be a breaking change for little benefit. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public void Aborted( Exception e ) { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Aborted ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Aborted( this.internalEnlistment, e ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } } public void Committed() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Committed" ); EnlistmentCallbackPositiveTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Committed ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Committed( this.internalEnlistment ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Committed" ); } } public void InDoubt() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } lock( this.internalEnlistment.SyncRoot ) { if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.InDoubt ); } this.internalEnlistment.State.InDoubt( this.internalEnlistment, null ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } } // Changing the e paramater name would be a breaking change for little benefit. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public void InDoubt( Exception e ) { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } lock( this.internalEnlistment.SyncRoot ) { if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.InDoubt ); } this.internalEnlistment.State.InDoubt( this.internalEnlistment, e ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Transactions { using System; using System.Diagnostics; using System.Threading; using System.Transactions; using System.Transactions.Diagnostics; public class SinglePhaseEnlistment : Enlistment { internal SinglePhaseEnlistment( InternalEnlistment enlistment ) : base(enlistment) { } public void Aborted() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Aborted ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Aborted( this.internalEnlistment, null ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } } // Changing the e paramater name would be a breaking change for little benefit. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public void Aborted( Exception e ) { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Aborted ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Aborted( this.internalEnlistment, e ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Aborted" ); } } public void Committed() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Committed" ); EnlistmentCallbackPositiveTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Committed ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Committed( this.internalEnlistment ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.Committed" ); } } public void InDoubt() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } lock( this.internalEnlistment.SyncRoot ) { if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.InDoubt ); } this.internalEnlistment.State.InDoubt( this.internalEnlistment, null ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } } // Changing the e paramater name would be a breaking change for little benefit. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public void InDoubt( Exception e ) { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } lock( this.internalEnlistment.SyncRoot ) { if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.InDoubt ); } this.internalEnlistment.State.InDoubt( this.internalEnlistment, e ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "SinglePhaseEnlistment.InDoubt" ); } } } } // 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
- DataTableNewRowEvent.cs
- HashRepartitionStream.cs
- Simplifier.cs
- DocobjHost.cs
- MappingSource.cs
- SecurityTokenParametersEnumerable.cs
- SinglePhaseEnlistment.cs
- DataServiceKeyAttribute.cs
- RoutedUICommand.cs
- XmlHierarchicalEnumerable.cs
- ResXResourceWriter.cs
- BitmapEffectGroup.cs
- ExpressionBindingCollection.cs
- DrawingDrawingContext.cs
- ObjectStateFormatter.cs
- CssTextWriter.cs
- METAHEADER.cs
- ServerTooBusyException.cs
- IfAction.cs
- ApplicationContext.cs
- ActivityCodeGenerator.cs
- Interlocked.cs
- ResolveNameEventArgs.cs
- HttpModulesSection.cs
- ForeignConstraint.cs
- PreservationFileWriter.cs
- Compiler.cs
- DocumentSequenceHighlightLayer.cs
- SymLanguageType.cs
- BooleanExpr.cs
- NullReferenceException.cs
- ObjectToIdCache.cs
- HttpRequestCacheValidator.cs
- OracleConnection.cs
- COM2IDispatchConverter.cs
- RadioButtonStandardAdapter.cs
- Token.cs
- OleDbDataAdapter.cs
- Scripts.cs
- ADConnectionHelper.cs
- WebPartDisplayMode.cs
- SkewTransform.cs
- ConfigXmlAttribute.cs
- XmlTextReaderImplHelpers.cs
- DefaultMergeHelper.cs
- CellParaClient.cs
- ToolZone.cs
- categoryentry.cs
- StackBuilderSink.cs
- RegistryDataKey.cs
- Point3DAnimationBase.cs
- WebPartsSection.cs
- ToolStripSplitStackLayout.cs
- ScrollPatternIdentifiers.cs
- CngProperty.cs
- ThreadPool.cs
- XmlCharCheckingReader.cs
- ListViewGroupConverter.cs
- CompilerCollection.cs
- AsyncOperationManager.cs
- ContentType.cs
- CustomErrorCollection.cs
- StringAttributeCollection.cs
- DatePicker.cs
- SafeLibraryHandle.cs
- StringBlob.cs
- FrameDimension.cs
- ContactManager.cs
- FormsAuthenticationUserCollection.cs
- MessageFilter.cs
- TypeName.cs
- HttpCacheVary.cs
- SetStateDesigner.cs
- InstanceData.cs
- ToolStripSeparatorRenderEventArgs.cs
- FilterFactory.cs
- PropertyGridEditorPart.cs
- ReflectionUtil.cs
- Parameter.cs
- AppLevelCompilationSectionCache.cs
- OrderByBuilder.cs
- LinqDataSourceContextData.cs
- SqlTypeConverter.cs
- RegionInfo.cs
- SoapAttributeAttribute.cs
- CodeDOMProvider.cs
- GPPOINT.cs
- WsatTransactionHeader.cs
- EntityContainerEntitySet.cs
- IIS7ConfigurationLoader.cs
- TypeGeneratedEventArgs.cs
- NameValuePermission.cs
- FlatButtonAppearance.cs
- Matrix3D.cs
- PropertyChangedEventManager.cs
- CustomError.cs
- ComplexPropertyEntry.cs
- Unit.cs
- GifBitmapDecoder.cs
- CodeSubDirectoriesCollection.cs