Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Abstract class: RT.Servers.FileSession

Summary

Provides functionality to track user sessions in HTTP requests using cookies and to store such user sessions in the local file system.

Remarks

In order to use this class, you must create a class that derives from it. See the remarks section in the Session documentation for usage guidelines.

Instance methods

void
CleanUp(HttpResponse response, bool wasModified)
Saves/deletes the session and/or sets the session cookie, as appropriate. Only call this if you are not using Session.EnableAutomatic<TSession>(HttpRequest, Func<TSession, HttpResponse>), Session.EnableManual<TSession>(HttpRequest, Func<TSession, HttpResponse>), SessionExtensions or anything else that already calls it.
string
  • Inherited from Session
  • Overrides: object.ToString()
Returns a string representation of this session object.

Static methods

HttpResponse
EnableAutomatic<TSession>(HttpRequest req, Func<TSession, HttpResponse> handler)
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>). (see also remarks)
HttpResponse
EnableManual<TSession>(HttpRequest req, Func<TSession, HttpResponse> handler)
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. If your session class does not have a default constructor, use SessionExtensions.EnableManual<TSession>(this TSession, HttpRequest, Func<TSession, HttpResponse>). (see also remarks)

Instance properties

SessionActionControls what happens to the session data when the request handler returns.
bool True if a new session was created, or any of the cookie parameters were modified (such as Session.CookieExpires).
stringContains the session ID, which is also the cookie value.
bool True if a new session was created, or any of the session variables were modified. Derived classes should set this to true whenever a session variable is modified. Set this to false to discard all session changes (otherwise they will be saved upon session Session.CleanUp(HttpResponse, bool)).