/// <summary> /// The constructor. /// </summary> protected Session() { state = Start.Instance(this); _running = true; _startedProtocol = false; }
/// <summary> /// Default function for a state-transition. /// </summary> /// <param name="session">Corresponding Surface protocol run.</param> /// <param name="state">Next state.</param> internal virtual void changeState(Session session, State state) { session.changeState(state); }
/// <summary> /// Changes the state of the protocol run. /// </summary> /// <param name="to">State to transition to.</param> internal void changeState(State to) { state = to; }