public SessionStateStack(Session owner) { if (owner == null) throw new ArgumentNullException("owner", "owner is null."); this.owner = owner; sessionStates = new Stack<SessionState>(); }
private void CreateAndStartInputThreadFor(Session session) { SessionInputReader inputReader = new SessionInputReader(session); lock (sessionInputReaders) sessionInputReaders.Add(inputReader); inputReader.Disposed += InputReaderDisposed; inputReader.Start(); }
public SessionInputReader(Session session) { if (session == null) throw new ArgumentNullException("session", "session is null."); this.session = session; this.inputThread = null; this.disposed = false; WireUpEvents(); }
public static Session Create(IConnection connection, SessionState sessionState, IConnectionWriterFactory connectionWriterFactory, IServiceProvider services) { if (connection == null) throw new ArgumentNullException("connection", "connection is null."); if (sessionState == null) throw new ArgumentNullException("sessionState", "sessionState is null."); Session session = new Session(connectionWriterFactory) { Connection = connection, Services = services }; session.PushState(sessionState); return session; }