FdbTransactionDebugger
Namespace: FoundationDB.Client · class
Exposes the internal lifecycle state of transactions, for test harnesses and diagnostics.
Remarks
This is the equivalent, for the real client, of FakeDbDebugger in the FakeDb emulator: a small proxy that lets test code observe internal state without requiring an InternalsVisibleTo grant.
Application logic should never take decisions based on these observations: they are inherently racy, and only meaningful from the code path that owns the transaction.
The transaction must be a concrete FdbTransaction (not a filter or logging wrapper), otherwise an InvalidCastException is thrown.
Methods
GetHandler
static IFdbTransactionHandler GetHandler(IFdbReadOnlyTransaction trans)
Returns the low-level handler that implements this transaction (native client, FakeDb store, ...).
GetState
static TransactionState GetState(IFdbReadOnlyTransaction trans)
Returns the current lifecycle state of this transaction.
IsStillAlive
static bool IsStillAlive(IFdbReadOnlyTransaction trans)
Returns true if this transaction is still in a state where operations can be performed (i.e. Ready).