public void Add(Session sess) { lock (SessionManager._pool) { int threadid = Thread.CurrentThread.ManagedThreadId; SessionManager._pool[threadid] = sess; } }
protected Session(Session parent, IsolationLevel isoLevel) { //Nested Session this.SessionID = Guid.NewGuid(); //Create savepoint transaction this._Connection = parent._Connection; this._Transaction = new Transaction(parent.Connection, this.SessionID, isoLevel); //Set parent/child stuff this.Parent = parent; this.Parent.Children.Add(this); }