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
- DesignerGenericWebPart.cs
- XmlCharType.cs
- File.cs
- elementinformation.cs
- XmlCodeExporter.cs
- RankException.cs
- ScriptResourceAttribute.cs
- ServiceTimeoutsBehavior.cs
- MetadataItem.cs
- XmlILOptimizerVisitor.cs
- DrawingServices.cs
- PermissionToken.cs
- ProfileBuildProvider.cs
- TextEncodedRawTextWriter.cs
- ComponentGlyph.cs
- Grant.cs
- DataColumnMappingCollection.cs
- CompressionTransform.cs
- DictionaryEntry.cs
- LicFileLicenseProvider.cs
- VectorValueSerializer.cs
- RootBuilder.cs
- RemotingAttributes.cs
- DefaultPropertyAttribute.cs
- XmlWhitespace.cs
- RichTextBoxDesigner.cs
- SharedPerformanceCounter.cs
- WindowsBrush.cs
- SqlReferenceCollection.cs
- Panel.cs
- CharAnimationBase.cs
- SiteMapDataSourceView.cs
- TransactionState.cs
- Workspace.cs
- DispatcherSynchronizationContext.cs
- VirtualPath.cs
- VarRefManager.cs
- Evidence.cs
- RTLAwareMessageBox.cs
- CodeTypeDeclaration.cs
- SafeLocalMemHandle.cs
- metadatamappinghashervisitor.cs
- xdrvalidator.cs
- ObsoleteAttribute.cs
- WebPartCatalogAddVerb.cs
- SmiConnection.cs
- WebControlParameterProxy.cs
- MailDefinition.cs
- ConditionCollection.cs
- ZipIOExtraFieldZip64Element.cs
- DynamicResourceExtensionConverter.cs
- ProcessHostFactoryHelper.cs
- UnsafeNativeMethods.cs
- MouseEvent.cs
- ProxyAssemblyNotLoadedException.cs
- PopupEventArgs.cs
- StringArrayConverter.cs
- ImagingCache.cs
- AssociatedControlConverter.cs
- ManagementPath.cs
- MimeTypePropertyAttribute.cs
- NamespaceEmitter.cs
- SignatureDescription.cs
- ConnectionModeReader.cs
- SectionInformation.cs
- GridLength.cs
- SafePointer.cs
- CopyAttributesAction.cs
- WindowsHyperlink.cs
- CompModSwitches.cs
- BufferedMessageData.cs
- WindowsRichEditRange.cs
- Point3DConverter.cs
- DrawingAttributeSerializer.cs
- LineGeometry.cs
- WindowProviderWrapper.cs
- SQLInt16.cs
- PTUtility.cs
- SerialPinChanges.cs
- DrawingContextWalker.cs
- XsltArgumentList.cs
- WindowsBrush.cs
- MatchAttribute.cs
- NamespaceQuery.cs
- EncryptedReference.cs
- Line.cs
- ThreadStartException.cs
- TextWriterEngine.cs
- CodeMethodInvokeExpression.cs
- DayRenderEvent.cs
- DataViewListener.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DesignerOptionService.cs
- RichTextBox.cs
- XmlSubtreeReader.cs
- SoapProtocolReflector.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- RegexMatchCollection.cs
- InkPresenterAutomationPeer.cs
- IQueryable.cs