Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: HttpResponse EnableManual<TSession>(this TSession, HttpRequest, Func<TSession, HttpResponse>)

Declaration

public static HttpResponse EnableManual<TSession>(
    this TSession session,
    HttpRequest req,
    Func<TSession, HttpResponse> handler
)

Summary

Enables the use of sessions in an HTTP request handler. Use this if your session class does not implement ISessionEquatable<TSession>; your class will have to manually set Session.SessionModified to true before the request handler returns if any change was made to the session.

Generic type parameters

TSession
  • Must derive from: RT.Servers.Session.
The type of session to be used.

Parameters

this TSessionsession An already-constructed empty session object. The session object will have Session.NewSession() or Session.ReadSession() called on it to populate it.
HttpRequestreq The HTTP request for which to enable session support.
Func<TSession, HttpResponse>handler HTTP request handler code that can make free use of a session variable.

Remarks

See the remarks section in the Session documentation for usage guidelines.

See also