Exemplo n.º 1
0
 public void Add(Session sess)
 {
     lock (SessionManager._pool)
     {
         int threadid = Thread.CurrentThread.ManagedThreadId;
         SessionManager._pool[threadid] = sess;
     }
 }
Exemplo n.º 2
0
        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);
        }