internal void ReleaseSession(BaseSession session) { Session newSession = new Session(session.InternalSession, this); if (_inUse.Contains((Session)session)) { _inUse.Remove((Session)session); Interlocked.Increment(ref _available); } try { newSession.Reset(); newSession.IdleSince = DateTime.Now; _inIdle.Enqueue(newSession); } catch { newSession = null; } _autoResetEvent.Set(); }
internal Schema(BaseSession session, string name) : base(null, name) { Schema = this; Session = session; }