public RenewSessionResponse RenewSession(RenewSessionRequest request) { string userName = request.Session.User; string sessionId = request.Session.SessionID; SimpleSession session = sessions.Find(s => s.SessionId == sessionId) ?? sessions.Find(s => s.UserName == userName); if (session != null) { return(new RenewSessionResponse { Session = session.GetSession() }); } throw new InvalidOperationException("Unable to find user with session"); }
public RenewSessionResponse RenewSession(RenewSessionRequest request) { return(Create().RenewSession(request)); }