/// <summary> /// Gets the session. /// </summary> /// <returns>SessionInfo.</returns> protected SessionInfo GetSession(ISessionContext sessionContext) { var session = sessionContext.GetSession(Request); if (session == null) { throw new ArgumentException("Session not found."); } return(session); }
/// <summary> /// Gets the session. /// </summary> /// <returns>SessionInfo.</returns> protected async Task <SessionInfo> GetSession(ISessionContext sessionContext) { var session = await sessionContext.GetSession(Request).ConfigureAwait(false); if (session == null) { throw new ArgumentException("Session not found."); } return(session); }