public async Task <bool> NewSession(NewSessionParameters newSessionParameters) { if (Session != null) { throw new InvalidOperationException("A session is already open in this instance."); } var newSession = await SessionViewModel.CreateNewSession(this, ServiceProvider, newSessionParameters); if (newSession != null) { Session = newSession; MRU.AddFile(Session.SolutionPath); } return(Session != null); }