/// <inheritdoc cref="ITransaction"/> public void Commit() { // We'll let the underlying connector throw here which it will if Commit is called on a non-active transaction. _connector.Commit(); OnFinishedTransaction?.Invoke(this, new TransactionEventArgs(true)); IsActive = false; }
/// <inheritdoc cref="ITransaction"/> public void Rollback() { if (!IsActive) { return; } _connector.Rollback(); AddTripleCount = 0; RemoveTripleCount = 0; OnFinishedTransaction?.Invoke(this, new TransactionEventArgs(false)); IsActive = false; }
public void Dispose() { if (Disposed) { return; } Transaction.Dispose(); if (OnFinishedTransaction != null) { foreach (Delegate e in OnFinishedTransaction.GetInvocationList()) { OnFinishedTransaction -= (FinishedTransaction)e; } } Disposed = true; }