src/Foundation/Net/Gimela.Net.Http/Sessions/SessionProvider.cs
/// <summary>
/// Loads a session for all requests that got the session cookie.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The RequestEventArgs instance containing the event data.</param>
Loads a session for all requests that got the session cookie.
Loads a session for all requests that got the session cookie .
private void OnRequest(object sender, RequestEventArgs e)
    {
      _currentSession = null;
      RequestCookie cookie = e.Request.Cookies[_cookieName];
      if (cookie == null)
        return;
      string id = cookie.Value;
      _currentSession = (TSession)_store.Load(id);
      SessionLoaded(this, EventArgs.Empty);
      if (_currentSession != null)
        _store.Touch(_currentSession.SessionId);
    }
private void OnRequest ( object sender , RequestEventArgs e ) { _currentSession = null ; RequestCookie cookie = e . Request . Cookies [ _cookieName ] ; if ( cookie == null ) return ; string id = cookie . Value ; _currentSession = ( TSession ) _store . Load ( id ) ; SessionLoaded ( this , EventArgs . Empty ) ; if ( _currentSession != null ) _store . Touch ( _currentSession . SessionId ) ; }
Loads a session for all requests that got the session cookie.
Loads a session for all requests that got the session cookie .
sender
object
None
e
RequestEventArgs
The RequestEventArgs instance containing the event data.
The RequestEventArgs instance containing the event data .