Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: HttpResponse EnableAutomatic<TSession>(HttpRequest, Func<TSession, HttpResponse>)

Declaration

public static HttpResponse EnableAutomatic<TSession>(
    HttpRequest req,
    Func<TSession, HttpResponse> handler
)

Summary

Enables the use of sessions in an HTTP request handler. Use this if your session class implements ISessionEquatable<TSession>. If your session class does not have a default constructor, use SessionExtensions.EnableAutomatic<TSession>(this TSession, HttpRequest, Func<TSession, HttpResponse>).

Generic type parameters

TSession The type of session to be used.

Parameters

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