C# Класс NLight.Transactions.TransactionContext

Represents a transaction context.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Enter void
OnStateChanged void
Parent_TransactionContextStateChanged void
VoteCommitFromChild void
VoteRollbackFromChild void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases resources.

Приватные методы

Метод Описание
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.

Описание методов

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases resources.
protected Dispose ( bool disposing ) : void
disposing bool true if this instance is disposed manually; false if it is disposed during finalization.
Результат void

Exit() публичный Метод

Exits the transaction context. Its commit or rollback status becomes final.
/// The requested transaction context state change is invalid. ///
public Exit ( ) : void
Результат void

GetController() публичный Метод

Gets the controlling transaction context.
public GetController ( ) : TransactionContext
Результат TransactionContext

TransactionContext() публичный Метод

Initializes a new instance of the TransactionContext class.
public TransactionContext ( TransactionContextAffinity affinity ) : System
affinity TransactionContextAffinity The transaction context affinity.
Результат System

VoteCommit() публичный Метод

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
Результат void

VoteRollback() публичный Метод

Votes rollback for the currently executing operation.
/// The requested transaction context state change is invalid. ///
public VoteRollback ( ) : void
Результат void