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
- CodeTypeConstructor.cs
- StartFileNameEditor.cs
- RadialGradientBrush.cs
- StrokeDescriptor.cs
- ShaderEffect.cs
- XpsException.cs
- AudioException.cs
- remotingproxy.cs
- ArgumentOutOfRangeException.cs
- ProviderUtil.cs
- BufferedGraphicsManager.cs
- FileFormatException.cs
- EqualityArray.cs
- HtmlTableRowCollection.cs
- SpAudioStreamWrapper.cs
- AutomationPatternInfo.cs
- GeneralTransformGroup.cs
- AppendHelper.cs
- TreeWalker.cs
- LinkConverter.cs
- ProvidePropertyAttribute.cs
- ShapeTypeface.cs
- AccessedThroughPropertyAttribute.cs
- ApplicationGesture.cs
- EntityDataSourceDesignerHelper.cs
- SqlNotificationRequest.cs
- ApplyTemplatesAction.cs
- _ListenerRequestStream.cs
- HttpDigestClientElement.cs
- XmlSchema.cs
- RawStylusInputCustomData.cs
- MessageQueueException.cs
- _AutoWebProxyScriptHelper.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- x509utils.cs
- ActivityCollectionMarkupSerializer.cs
- safesecurityhelperavalon.cs
- xmlformatgeneratorstatics.cs
- ChannelSinkStacks.cs
- EditBehavior.cs
- PolicyLevel.cs
- UnsafeNativeMethods.cs
- RoleGroupCollection.cs
- _ContextAwareResult.cs
- X509ChainPolicy.cs
- DocumentGridPage.cs
- MsmqActivation.cs
- StringPropertyBuilder.cs
- SignedXml.cs
- OdbcConnectionHandle.cs
- DialogBaseForm.cs
- storepermission.cs
- CompiledRegexRunner.cs
- WindowsEditBoxRange.cs
- Set.cs
- OpacityConverter.cs
- returneventsaver.cs
- ReflectEventDescriptor.cs
- EntityContainerEmitter.cs
- MetafileHeaderWmf.cs
- ChannelServices.cs
- SafeNativeMemoryHandle.cs
- StyleSelector.cs
- LockCookie.cs
- StylusButtonCollection.cs
- PenThreadWorker.cs
- CheckedListBox.cs
- SoapInteropTypes.cs
- safesecurityhelperavalon.cs
- CollectionChangeEventArgs.cs
- ComponentManagerBroker.cs
- GPRECTF.cs
- KeySpline.cs
- PageBreakRecord.cs
- GlyphCache.cs
- ContractTypeNameCollection.cs
- Imaging.cs
- ServiceProviders.cs
- WsatServiceAddress.cs
- DesignerSerializationOptionsAttribute.cs
- TimeSpanParse.cs
- DataViewListener.cs
- WorkflowOperationAsyncResult.cs
- BuildProviderAppliesToAttribute.cs
- ResourceProviderFactory.cs
- ExpressionEditorSheet.cs
- SessionStateItemCollection.cs
- MappableObjectManager.cs
- EventSchemaTraceListener.cs
- SafePipeHandle.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- PrefixHandle.cs
- SqlXml.cs
- Calendar.cs
- DayRenderEvent.cs
- SqlConnectionHelper.cs
- AddressHeaderCollection.cs
- PersonalizationDictionary.cs
- OletxEnlistment.cs
- OdbcConnectionFactory.cs