C# Class Nexus.Transactions.TransactionScope

Manages the ambient transaction.
Inheritance: IDisposable
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Méthodes publiques

Méthode Description
Complete ( ) : void

Completes the transaction.

This method gets votes from all the participants on whether or not the transaction should be committed.

Dispose ( ) : void

Disposes of the transaction scope, and removes the ambient transaction.

This makes sure the transaction is rolled back if the scope hasn't completed.

TransactionScope ( ) : System

The default constructor.

This sets up the ambient transaction. This class allows the sharing of a transaction across multiple threads. However, it is expected that all threads created in the scope of the TransactionScope will have finished their work before Complete() is called. If a thread does work after Complete() has been called, expecting to enroll in the same transaction, the behaviour is undefined.

Method Details

Complete() public méthode

Completes the transaction.
This method gets votes from all the participants on whether or not the transaction should be committed.
public Complete ( ) : void
Résultat void

Dispose() public méthode

Disposes of the transaction scope, and removes the ambient transaction.
This makes sure the transaction is rolled back if the scope hasn't completed.
public Dispose ( ) : void
Résultat void

TransactionScope() public méthode

The default constructor.
This sets up the ambient transaction. This class allows the sharing of a transaction across multiple threads. However, it is expected that all threads created in the scope of the TransactionScope will have finished their work before Complete() is called. If a thread does work after Complete() has been called, expecting to enroll in the same transaction, the behaviour is undefined.
public TransactionScope ( ) : System
Résultat System