HttpSessionStateWrapper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encapsulates the HTTP intrinsic object that provides access to session-state values, session-level settings, and lifetime management methods.
public ref class HttpSessionStateWrapper : System::Web::HttpSessionStateBase
public class HttpSessionStateWrapper : System.Web.HttpSessionStateBase
type HttpSessionStateWrapper = class
inherit HttpSessionStateBase
Public Class HttpSessionStateWrapper
Inherits HttpSessionStateBase
- Inheritance
Remarks
The HttpSessionStateWrapper class derives from the HttpSessionStateBase class and serves as a wrapper for the HttpSessionState class. This class exposes the functionality of the HttpSessionState class and exposes the HttpSessionStateBase type. The HttpSessionStateBase class lets you replace the original implementation of the HttpSessionState class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.
Constructors
HttpSessionStateWrapper(HttpSessionState) |
Initializes a new instance of the HttpSessionStateWrapper class. |
Properties
CodePage |
Gets or sets the character-set identifier for the current session. |
Contents |
Gets a reference to the current session-state object. |
CookieMode |
Gets a value that indicates whether the application is configured for cookieless sessions. |
Count |
Gets the number of items in the session-state collection. |
IsCookieless |
Gets a value that indicates whether the session ID is embedded in the URL. |
IsNewSession |
Gets a value that indicates whether the session was created during the current request. |
IsReadOnly |
Gets a value that indicates whether the session is read-only. |
IsSynchronized |
Gets a value that indicates whether access to the collection of session-state values is synchronized (thread safe). |
Item[Int32] |
Gets or sets a session value by using the specified index. |
Item[String] |
Gets or sets a session value by using the specified name. |
Keys |
Gets a collection of the keys for all values that are stored in the session-state collection. |
LCID |
Gets or sets the locale identifier (LCID) of the current session. |
Mode |
Gets the current session-state mode. |
SessionID |
Gets the unique identifier for the session. |
StaticObjects |
Gets a collection of objects that are declared by |
SyncRoot |
Gets an object that can be used to synchronize access to the collection of session-state values. |
Timeout |
Gets or sets the time, in minutes, that can elapse between requests before the session-state provider ends the session. |
Methods
Abandon() |
Cancels the current session. |
Add(String, Object) |
Adds an item to the session-state collection. |
Clear() |
Removes all keys and values from the session-state collection. |
CopyTo(Array, Int32) |
Copies the collection of session-state values to a one-dimensional array, starting at the specified index in the array. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetEnumerator() |
Returns an enumerator that can be used to read all the session-state variable names in the current session. |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
Remove(String) |
Deletes an item from the session-state collection. |
RemoveAll() |
Removes all keys and values from the session-state collection. |
RemoveAt(Int32) |
Deletes the item at the specified index from the session-state collection. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
Cast<TResult>(IEnumerable) |
Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Converts an IEnumerable to an IQueryable. |