Beispiel #1
0
 private void MarkOpened()
 {
     if (Interlocked.CompareExchange(ref _opened, 1, 0) != 0)
     {
         throw ExecutionContextException.ConnectionAlreadyOpen();
     }
 }
Beispiel #2
0
 public IContextBuilder UseTransaction(IsolationLevel il)
 {
     if (IsOpen)
     {
         throw ExecutionContextException.ConnectionAlreadyOpen();
     }
     _isolationLevel = il;
     return(this);
 }