C# Class System.Transactions.Transaction

Inheritance: System.IDisposable, System.Runtime.Serialization.ISerializable
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthode 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 méthode

public Clone ( ) : System.Transactions.Transaction
Résultat System.Transactions.Transaction

Clone() public méthode

public Clone ( ) : Transaction
Résultat Transaction

DependentClone() public méthode

public DependentClone ( DependentCloneOption cloneOption ) : DependentTransaction
cloneOption DependentCloneOption
Résultat DependentTransaction

DependentClone() public méthode

public DependentClone ( System cloneOption ) : System.Transactions.DependentTransaction
cloneOption System
Résultat System.Transactions.DependentTransaction

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EnlistDurable() public méthode

public EnlistDurable ( Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
enlistmentNotification IEnlistmentNotification
enlistmentOptions EnlistmentOptions
Résultat Enlistment

EnlistDurable() public méthode

public EnlistDurable ( Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
singlePhaseNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
Résultat Enlistment

EnlistDurable() public méthode

public EnlistDurable ( System resourceManagerIdentifier, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
resourceManagerIdentifier System
enlistmentNotification System
enlistmentOptions System
Résultat System.Transactions.Enlistment

EnlistPromotableSinglePhase() public méthode

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

EnlistPromotableSinglePhase() public méthode

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. ///
Résultat bool

EnlistPromotableSinglePhase() public méthode

public EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification ) : bool
promotableSinglePhaseNotification System
Résultat bool

EnlistPromotableSinglePhase() public méthode

public EnlistPromotableSinglePhase ( System promotableSinglePhaseNotification, System promoterType ) : bool
promotableSinglePhaseNotification System
promoterType System
Résultat bool

EnlistVolatile() public méthode

public EnlistVolatile ( IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
enlistmentNotification IEnlistmentNotification
enlistmentOptions EnlistmentOptions
Résultat Enlistment

EnlistVolatile() public méthode

public EnlistVolatile ( ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
singlePhaseNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
Résultat Enlistment

EnlistVolatile() public méthode

public EnlistVolatile ( System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
enlistmentNotification System
enlistmentOptions System
Résultat System.Transactions.Enlistment

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetPromotedToken() public méthode

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[]
Résultat byte[]

PromoteAndEnlistDurable() public méthode

public PromoteAndEnlistDurable ( Guid resourceManagerIdentifier, IPromotableSinglePhaseNotification promotableNotification, ISinglePhaseNotification enlistmentNotification, EnlistmentOptions enlistmentOptions ) : Enlistment
resourceManagerIdentifier Guid
promotableNotification IPromotableSinglePhaseNotification
enlistmentNotification ISinglePhaseNotification
enlistmentOptions EnlistmentOptions
Résultat Enlistment

PromoteAndEnlistDurable() public méthode

public PromoteAndEnlistDurable ( System resourceManagerIdentifier, System promotableNotification, System enlistmentNotification, System enlistmentOptions ) : System.Transactions.Enlistment
resourceManagerIdentifier System
promotableNotification System
enlistmentNotification System
enlistmentOptions System
Résultat System.Transactions.Enlistment

Rollback() public méthode

public Rollback ( ) : void
Résultat void

Rollback() public méthode

public Rollback ( Exception e ) : void
e Exception
Résultat void

Rollback() public méthode

public Rollback ( System e ) : void
e System
Résultat void

SetDistributedTransactionIdentifier() public méthode

public SetDistributedTransactionIdentifier ( IPromotableSinglePhaseNotification promotableNotification, Guid distributedTransactionIdentifier ) : void
promotableNotification IPromotableSinglePhaseNotification
distributedTransactionIdentifier Guid
Résultat void

SetDistributedTransactionIdentifier() public méthode

public SetDistributedTransactionIdentifier ( System promotableNotification, System distributedTransactionIdentifier ) : void
promotableNotification System
distributedTransactionIdentifier System
Résultat void

operator() public static méthode

public static operator ( ) : bool
Résultat bool