// Constructors public SqlTransactionScope() { // Register if (_connectionScope == null) { _connectionScope = new SqlConnectionScope(); } _connectionScope.Register(_consumerId); }
// Constructors public SqlTransactionScope(IsolationLevel isolationLevel = IsolationLevel.ReadCommitted) { // Register if (_connectionScope == null) { _connectionScope = new SqlConnectionScope(isolationLevel); } _connectionScope.Register(_consumerId); }
public void Dispose() { // Require if (_connectionScope == null) throw new InvalidOperationException(); // Dispose if (_connectionScope.Dispose(_consumerId) == true) { _connectionScope = null; } }
public void Dispose() { // Require if (_connectionScope == null) { throw new InvalidOperationException(); } // Dispose if (_connectionScope.Dispose(_consumerId) == true) { _connectionScope = null; } }