C# Class System.Transactions.Transaction

Inheritance: System.IDisposable, System.Runtime.Serialization.ISerializable
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
FastGetTransaction Transaction
GetCurrentTransactionAndScope void
ISerializable void
InternalClone Transaction
InternalDispose void
InteropMode EnterpriseServicesInteropOption
Promote DistributedTransaction
System void
Transaction
Transaction System.Diagnostics
Transaction System.Diagnostics
Transaction System.Diagnostics
Transaction System.Diagnostics
UseServiceDomainForCurrent bool

Public Methods

Method Description
Clone ( ) : System.Transactions.Transaction
Clone ( ) : Transaction
DependentClone ( DependentCloneOption cloneOption ) : DependentTransaction
DependentClone ( System cloneOption ) : System.Transactions.DependentTransaction
Dispose ( ) : void
EnlistDurable ( Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
EnlistDurable ( Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
EnlistDurable ( System resourceManagerIdentifier, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
EnlistPromotableSinglePhase ( IPromotableSinglePhaseNotification promotableSinglePhaseNotification ) : bool

Create a promotable single phase enlistment that promotes to MSDTC.

EnlistPromotableSinglePhase ( IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType ) : bool

Create a promotable single phase enlistment that promotes to a distributed transaction manager other than MSDTC.

EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification ) : bool
EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification, System promoterType ) : bool
EnlistVolatile ( IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
EnlistVolatile ( ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
EnlistVolatile ( System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
Equals ( object obj ) : bool
GetHashCode ( ) : int
GetPromotedToken ( ) : byte[]

Gets the PromotedToken for the transaction. If the transaction has not already been promoted, retrieving this value will cause promotion. Before retrieving the PromotedToken, the Transaction.PromoterType value should be checked to see if it is a promoter type (Guid) that the caller understands. If the caller does not recognize the PromoterType value, retreiving the PromotedToken doesn't have much value because the caller doesn't know how to utilize it. But if the PromoterType is recognized, the caller should know how to utilize the PromotedToken to communicate with the promoting distributed transaction coordinator to enlist on the distributed transaction. If the value of a transaction's PromoterType is TransactionInterop.PromoterTypeDtc, then that transaction's PromotedToken will be an MSDTC-based TransmitterPropagationToken.

PromoteAndEnlistDurable ( Guid resourceManagerIdentifier, IPromotableSinglePhaseNotification promotableNotification, ISinglePhaseNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
PromoteAndEnlistDurable ( System resourceManagerIdentifier, System promotableNotification, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
Rollback ( ) : void
Rollback ( Exception e ) : void
Rollback ( System e ) : void
SetDistributedTransactionIdentifier ( IPromotableSinglePhaseNotification promotableNotification, Guid distributedTransactionIdentifier ) : void
SetDistributedTransactionIdentifier ( System promotableNotification, System distributedTransactionIdentifier ) : void
operator ( ) : bool

Private Methods

Method Description
FastGetTransaction ( TransactionScope currentScope, ContextData contextData, Transaction &contextTransaction ) : Transaction
GetCurrentTransactionAndScope ( TxLookup defaultLookup, Transaction &current, TransactionScope &currentScope, Transaction &contextTransaction ) : void
ISerializable ( SerializationInfo serializationInfo, StreamingContext context ) : void
InternalClone ( ) : Transaction
InternalDispose ( ) : void
InteropMode ( TransactionScope currentScope ) : EnterpriseServicesInteropOption
Promote ( ) : DistributedTransaction
System ( System info, System context ) : void
Transaction ( )
Transaction ( ) : System.Diagnostics
Transaction ( DistributedTransaction distributedTransaction ) : System.Diagnostics
Transaction ( IsolationLevel isoLevel, ISimpleTransactionSuperior superior ) : System.Diagnostics
Transaction ( IsolationLevel isoLevel, InternalTransaction internalTransaction ) : System.Diagnostics
UseServiceDomainForCurrent ( ) : bool

Method Details

Clone() public method

public Clone ( ) : System.Transactions.Transaction
return System.Transactions.Transaction

Clone() public method

public Clone ( ) : Transaction
return Transaction

DependentClone() public method

public DependentClone ( DependentCloneOption cloneOption ) : DependentTransaction
cloneOption DependentCloneOption
return DependentTransaction

DependentClone() public method

public DependentClone ( System cloneOption ) : System.Transactions.DependentTransaction
cloneOption System
return System.Transactions.DependentTransaction

Dispose() public method

public Dispose ( ) : void
return void

EnlistDurable() public method

public EnlistDurable ( Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
enlistmentNotification IEnlistmentNotification
enlistmentOptions EnlistmentOptions
return Enlistment

EnlistDurable() public method

public EnlistDurable ( Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
singlePhaseNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
return Enlistment

EnlistDurable() public method

public EnlistDurable ( System resourceManagerIdentifier, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
resourceManagerIdentifier System
enlistmentNotification System
enlistmentOptions System
return System.Transactions.Enlistment

EnlistPromotableSinglePhase() public method

Create a promotable single phase enlistment that promotes to MSDTC.
public EnlistPromotableSinglePhase ( IPromotableSinglePhaseNotification promotableSinglePhaseNotification ) : bool
promotableSinglePhaseNotification IPromotableSinglePhaseNotification The object that implements the IPromotableSinglePhaseNotification interface.
return bool

EnlistPromotableSinglePhase() public method

Create a promotable single phase enlistment that promotes to a distributed transaction manager other than MSDTC.
public EnlistPromotableSinglePhase ( IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType ) : bool
promotableSinglePhaseNotification IPromotableSinglePhaseNotification The object that implements the IPromotableSinglePhaseNotification interface.
promoterType Guid /// The promoter type Guid that identifies the format of the byte[] that is returned by the ITransactionPromoter.Promote /// call that is implemented by the IPromotableSinglePhaseNotificationObject, and thus the promoter of the transaction. ///
return bool

EnlistPromotableSinglePhase() public method

public EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification ) : bool
promotableSinglePhaseNotification System
return bool

EnlistPromotableSinglePhase() public method

public EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification, System promoterType ) : bool
promotableSinglePhaseNotification System
promoterType System
return bool

EnlistVolatile() public method

public EnlistVolatile ( IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
enlistmentNotification IEnlistmentNotification
enlistmentOptions EnlistmentOptions
return Enlistment

EnlistVolatile() public method

public EnlistVolatile ( ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
singlePhaseNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
return Enlistment

EnlistVolatile() public method

public EnlistVolatile ( System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
enlistmentNotification System
enlistmentOptions System
return System.Transactions.Enlistment

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetPromotedToken() public method

Gets the PromotedToken for the transaction. If the transaction has not already been promoted, retrieving this value will cause promotion. Before retrieving the PromotedToken, the Transaction.PromoterType value should be checked to see if it is a promoter type (Guid) that the caller understands. If the caller does not recognize the PromoterType value, retreiving the PromotedToken doesn't have much value because the caller doesn't know how to utilize it. But if the PromoterType is recognized, the caller should know how to utilize the PromotedToken to communicate with the promoting distributed transaction coordinator to enlist on the distributed transaction. If the value of a transaction's PromoterType is TransactionInterop.PromoterTypeDtc, then that transaction's PromotedToken will be an MSDTC-based TransmitterPropagationToken.
public GetPromotedToken ( ) : byte[]
return byte[]

PromoteAndEnlistDurable() public method

public PromoteAndEnlistDurable ( Guid resourceManagerIdentifier, IPromotableSinglePhaseNotification promotableNotification, ISinglePhaseNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
promotableNotification IPromotableSinglePhaseNotification
enlistmentNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
return Enlistment

PromoteAndEnlistDurable() public method

public PromoteAndEnlistDurable ( System resourceManagerIdentifier, System promotableNotification, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
resourceManagerIdentifier System
promotableNotification System
enlistmentNotification System
enlistmentOptions System
return System.Transactions.Enlistment

Rollback() public method

public Rollback ( ) : void
return void

Rollback() public method

public Rollback ( Exception e ) : void
e Exception
return void

Rollback() public method

public Rollback ( System e ) : void
e System
return void

SetDistributedTransactionIdentifier() public method

public SetDistributedTransactionIdentifier ( IPromotableSinglePhaseNotification promotableNotification, Guid distributedTransactionIdentifier ) : void
promotableNotification IPromotableSinglePhaseNotification
distributedTransactionIdentifier Guid
return void

SetDistributedTransactionIdentifier() public method

public SetDistributedTransactionIdentifier ( System promotableNotification, System distributedTransactionIdentifier ) : void
promotableNotification System
distributedTransactionIdentifier System
return void

operator() public static method

public static operator ( ) : bool
return bool