Esempio n. 1
0
 // Constructors
 public SqlTransactionScope()
 {
     // Register
     if (_connectionScope == null)
     {
         _connectionScope = new SqlConnectionScope();
     }
     _connectionScope.Register(_consumerId);
 }
Esempio n. 2
0
 // Constructors
 public SqlTransactionScope()
 {
     // Register
     if (_connectionScope == null)
     {
         _connectionScope = new SqlConnectionScope();
     }
     _connectionScope.Register(_consumerId);
 }
Esempio n. 3
0
 // Constructors
 public SqlTransactionScope(IsolationLevel isolationLevel = IsolationLevel.ReadCommitted)
 {
     // Register
     if (_connectionScope == null)
     {
         _connectionScope = new SqlConnectionScope(isolationLevel);
     }
     _connectionScope.Register(_consumerId);
 }
Esempio n. 4
0
        public void Dispose()
        {
            // Require
            if (_connectionScope == null) throw new InvalidOperationException();

            // Dispose
            if (_connectionScope.Dispose(_consumerId) == true)
            {
                _connectionScope = null;
            }
        }
Esempio n. 5
0
        public void Dispose()
        {
            // Require
            if (_connectionScope == null)
            {
                throw new InvalidOperationException();
            }

            // Dispose
            if (_connectionScope.Dispose(_consumerId) == true)
            {
                _connectionScope = null;
            }
        }