private void ReplayWriteTransaction(TransactionActivityEntry transactionAwareActivityEntry, ref Transaction currentWriteTransaction) { Transaction tx; switch (transactionAwareActivityEntry.ActionType) { case DebugActionType.TransactionStart: tx = _env.NewTransaction(transactionAwareActivityEntry.Flags); currentWriteTransaction = tx; break; case DebugActionType.TransactionCommit: currentWriteTransaction.Commit(); break; case DebugActionType.TransactionRollback: currentWriteTransaction.Rollback(); break; case DebugActionType.TransactionDisposing: currentWriteTransaction.Dispose(); currentWriteTransaction = null; break; default: throw new InvalidOperationException("unsupported action type for readWrite transaction: " + transactionAwareActivityEntry.ActionType); } }