protected override void StartSessionInternal(TaskListener <RunningSession> taskListener, SessionStartInfo sessionStartInfo) { Logger.Log(TraceLevel.Info, Stage.Open, StageType.Called, new { sessionStartInfo }); RunningSession newSession = null; bool continueInvocation = true; bool callBase = false; if (continueInvocation) { newSession = new RunningSession() { isNewSession_ = false, SessionId = Guid.NewGuid().ToString() }; SessionIds.Add(newSession.SessionId); Sessions.Add(newSession.SessionId, newSession); SessionsStartInfo.Add(newSession.SessionId, sessionStartInfo); } if (callBase) { base.StartSessionInternal(taskListener, sessionStartInfo); } else { EnsureHttpClient_(); taskListener.OnComplete(newSession); } }
public RunningSession StartSession(SessionStartInfo sessionStartInfo) { logger_.Log("starting session: {0}", sessionStartInfo); var newSession = new RunningSession() { isNewSession_ = false, SessionId = Guid.NewGuid().ToString() }; SessionIds.Add(newSession.SessionId); Sessions.Add(newSession.SessionId, newSession); SessionsStartInfo.Add(newSession.SessionId, sessionStartInfo); return(newSession); }