Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / PreparingEnlistment.cs / 1305376 / PreparingEnlistment.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- #define DEMAND_TX_PERM namespace System.Transactions { using System; using System.Diagnostics; using System.Threading; using System.Transactions; using System.Transactions.Diagnostics; public class PreparingEnlistment : Enlistment { internal PreparingEnlistment( InternalEnlistment enlistment ) : base(enlistment) { } public void Prepared() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.Prepared" ); EnlistmentCallbackPositiveTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.Prepared ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.Prepared( this.internalEnlistment ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.Prepared" ); } } public void ForceRollback() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.ForceRollback" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.ForceRollback ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.ForceRollback( this.internalEnlistment, null ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.ForceRollback" ); } } // Changing the e paramater name would be a breaking change for little benefit. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public void ForceRollback( Exception e ) { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.ForceRollback" ); } if ( DiagnosticTrace.Warning ) { EnlistmentCallbackNegativeTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.internalEnlistment.EnlistmentTraceId, EnlistmentCallback.ForceRollback ); } lock( this.internalEnlistment.SyncRoot ) { this.internalEnlistment.State.ForceRollback( this.internalEnlistment, e ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.ForceRollback" ); } } public byte[] RecoveryInformation() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.RecoveryInformation" ); } try { lock( this.internalEnlistment.SyncRoot ) { return this.internalEnlistment.State.RecoveryInformation( this.internalEnlistment ); } } finally { if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "PreparingEnlistment.RecoveryInformation" ); } } } } } // 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
- TrustManagerMoreInformation.cs
- TemplateBindingExpressionConverter.cs
- DataColumnSelectionConverter.cs
- SecureEnvironment.cs
- StringAttributeCollection.cs
- OracleParameter.cs
- SystemKeyConverter.cs
- RotateTransform3D.cs
- BindingExpressionBase.cs
- SymbolMethod.cs
- BlockUIContainer.cs
- FilteredDataSetHelper.cs
- DataControlImageButton.cs
- DependencyProperty.cs
- Sequence.cs
- Graphics.cs
- BamlStream.cs
- ConvertersCollection.cs
- AppManager.cs
- RtfFormatStack.cs
- DataControlFieldCollection.cs
- SqlBulkCopyColumnMapping.cs
- DataStreams.cs
- CompositeClientFormatter.cs
- BaseProcessProtocolHandler.cs
- SafeNativeMethods.cs
- templategroup.cs
- RowToFieldTransformer.cs
- WebPartCatalogCloseVerb.cs
- TypedTableBaseExtensions.cs
- ThreadPool.cs
- WizardForm.cs
- StorageRoot.cs
- D3DImage.cs
- ViewSimplifier.cs
- Transform.cs
- ManagementDateTime.cs
- PageAsyncTask.cs
- ConfigurationLocation.cs
- ErrorHandler.cs
- SafeCryptHandles.cs
- KeysConverter.cs
- InstanceDataCollectionCollection.cs
- VirtualDirectoryMapping.cs
- ToggleProviderWrapper.cs
- ByteArrayHelperWithString.cs
- IdnMapping.cs
- XMLUtil.cs
- MergePropertyDescriptor.cs
- ClientUtils.cs
- Typography.cs
- mediaeventargs.cs
- DataPagerFieldCommandEventArgs.cs
- ResourceDescriptionAttribute.cs
- WebPartConnectionCollection.cs
- CompilerInfo.cs
- AttributeProviderAttribute.cs
- InternalException.cs
- Nullable.cs
- DropShadowBitmapEffect.cs
- mediaeventargs.cs
- PerspectiveCamera.cs
- SourceInterpreter.cs
- ProcessRequestArgs.cs
- DataGridColumn.cs
- SqlStream.cs
- Splitter.cs
- CqlLexer.cs
- MultilineStringConverter.cs
- LinqDataView.cs
- CommentEmitter.cs
- MouseEventArgs.cs
- Html32TextWriter.cs
- MailMessageEventArgs.cs
- AuthenticateEventArgs.cs
- EndpointPerformanceCounters.cs
- SymbolType.cs
- DataFormats.cs
- DataControlLinkButton.cs
- xmlfixedPageInfo.cs
- InputScopeNameConverter.cs
- SqlErrorCollection.cs
- OciEnlistContext.cs
- VisualState.cs
- AssemblyCollection.cs
- EntityDataSourceEntitySetNameItem.cs
- HttpWebRequestElement.cs
- TokenCreationParameter.cs
- TextBoxBase.cs
- ProcessingInstructionAction.cs
- hwndwrapper.cs
- _AutoWebProxyScriptEngine.cs
- PseudoWebRequest.cs
- CharAnimationBase.cs
- MobileErrorInfo.cs
- Subset.cs
- HuffModule.cs
- ToolStripItemImageRenderEventArgs.cs
- ComAdminWrapper.cs
- Update.cs