Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ITransaction.cs
1using System;
2using System.Threading.Tasks;
3
5{
9 public interface ITransaction : IDisposable
10 {
14 Guid Id
15 {
16 get;
17 }
18
23 {
24 get;
25 }
26
30 object Tag
31 {
32 get;
33 set;
34 }
35
40
47 Task<bool> Prepare();
48
54 Task<bool> Execute();
55
61 Task<bool> Commit();
62
68 Task<bool> Rollback();
69
73 Task Abort();
74 }
75}
Interface for transactions
Definition: ITransaction.cs:10
Task< bool > Execute()
Executes the transaction.
Task< bool > Prepare()
Prepares the transaction for execution. This step can be used for validation and authorization of the...
Task< bool > Rollback()
Rolls back any changes made during the execution phase.
Task Abort()
Aborts the transaction.
TransactionEventHandler StateChanged
Event raised when the transaction state has changed.
Definition: ITransaction.cs:39
TransactionState State
Transaction state.
Definition: ITransaction.cs:23
object Tag
Caller can use this property to tag the transaction with information.
Definition: ITransaction.cs:31
Task< bool > Commit()
Commits any changes made during the execution phase.
delegate Task TransactionEventHandler(object Sender, TransactionEventArgs e)
Delegate for transaction events.
TransactionState
State of a transaction