C# Class NLight.Transactions.TransactionContext

Represents a transaction context.
Inheritance: IDisposable
ファイルを表示 Open project: slorion/nlight Class Usage Examples

Private Properties

Property Type Description
Enter void
OnStateChanged void
Parent_TransactionContextStateChanged void
VoteCommitFromChild void
VoteRollbackFromChild void

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Exit ( ) : void

Exits the transaction context. Its commit or rollback status becomes final.

GetController ( ) : TransactionContext

Gets the controlling transaction context.

TransactionContext ( TransactionContextAffinity affinity ) : System

Initializes a new instance of the TransactionContext class.

VoteCommit ( ) : void

Votes commit for the currently executing operation. A rollback must not have been voted before.

VoteRollback ( ) : void

Votes rollback for the currently executing operation.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases resources.

Private Methods

Method Description
Enter ( ) : void

Enters the transaction context. It will become the new current transaction context.

OnStateChanged ( TransactionContextState previousState, TransactionContextState newState ) : void

Raises the StateChanged event.

Parent_TransactionContextStateChanged ( object sender, TransactionContextStateChangedEventArgs e ) : void

Handles the parent transaction context's StateChanged event.

VoteCommitFromChild ( ) : void

Casts the commit vote on parent from a child.

VoteRollbackFromChild ( ) : void

Casts the rollback vote on parent from a child.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases resources.
protected Dispose ( bool disposing ) : void
disposing bool true if this instance is disposed manually; false if it is disposed during finalization.
return void

Exit() public method

Exits the transaction context. Its commit or rollback status becomes final.
/// The requested transaction context state change is invalid. ///
public Exit ( ) : void
return void

GetController() public method

Gets the controlling transaction context.
public GetController ( ) : TransactionContext
return TransactionContext

TransactionContext() public method

Initializes a new instance of the TransactionContext class.
public TransactionContext ( TransactionContextAffinity affinity ) : System
affinity TransactionContextAffinity The transaction context affinity.
return System

VoteCommit() public method

Votes commit for the currently executing operation. A rollback must not have been voted before.
/// The requested transaction context state change is invalid. ///
public VoteCommit ( ) : void
return void

VoteRollback() public method

Votes rollback for the currently executing operation.
/// The requested transaction context state change is invalid. ///
public VoteRollback ( ) : void
return void