Interface ITransactionScopeCallbacks
- Namespace
- Excalibur.Data.Persistence
- Assembly
- Excalibur.Data.Abstractions.dll
Provides lifecycle callback registration for transaction scopes.
public interface ITransactionScopeCallbacks
Remarks
This is an ISP sub-interface of ITransactionScope. Consumers that need
to register callbacks on commit, rollback, or completion can check for this interface
via pattern matching: if (scope is ITransactionScopeCallbacks callbacks) { ... }
Methods
OnCommit(Func<Task>)
Registers a callback to be executed after the transaction commits.
void OnCommit(Func<Task> callback)
Parameters
OnComplete(Func<TransactionStatus, Task>)
Registers a callback to be executed when the transaction completes (commit or rollback).
void OnComplete(Func<TransactionStatus, Task> callback)
Parameters
callbackFunc<TransactionStatus, Task>The callback to execute.
OnRollback(Func<Task>)
Registers a callback to be executed after the transaction rolls back.
void OnRollback(Func<Task> callback)