HttpSessionStateWrapper HttpSessionStateWrapper HttpSessionStateWrapper HttpSessionStateWrapper Class

Definition

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
HttpSessionStateWrapperHttpSessionStateWrapperHttpSessionStateWrapperHttpSessionStateWrapper

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) HttpSessionStateWrapper(HttpSessionState) HttpSessionStateWrapper(HttpSessionState) HttpSessionStateWrapper(HttpSessionState)

Initializes a new instance of the HttpSessionStateWrapper class.

Properties

CodePage CodePage CodePage CodePage

Gets or sets the character-set identifier for the current session.

Contents Contents Contents Contents

Gets a reference to the current session-state object.

CookieMode CookieMode CookieMode CookieMode

Gets a value that indicates whether the application is configured for cookieless sessions.

Count Count Count Count

Gets the number of items in the session-state collection.

IsCookieless IsCookieless IsCookieless IsCookieless

Gets a value that indicates whether the session ID is embedded in the URL.

IsNewSession IsNewSession IsNewSession IsNewSession

Gets a value that indicates whether the session was created during the current request.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value that indicates whether the session is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

Gets a value that indicates whether access to the collection of session-state values is synchronized (thread safe).

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets or sets a session value by using the specified index.

Item[String] Item[String] Item[String] Item[String]

Gets or sets a session value by using the specified name.

Keys Keys Keys Keys

Gets a collection of the keys for all values that are stored in the session-state collection.

LCID LCID LCID LCID

Gets or sets the locale identifier (LCID) of the current session.

Mode Mode Mode Mode

Gets the current session-state mode.

SessionID SessionID SessionID SessionID

Gets the unique identifier for the session.

StaticObjects StaticObjects StaticObjects StaticObjects

Gets a collection of objects that are declared by object elements that are marked as server controls and scoped to the current session in the application's Global.asax file.

SyncRoot SyncRoot SyncRoot SyncRoot

Gets an object that can be used to synchronize access to the collection of session-state values.

Timeout Timeout Timeout Timeout

Gets or sets the time, in minutes, that can elapse between requests before the session-state provider ends the session.

Methods

Abandon() Abandon() Abandon() Abandon()

Cancels the current session.

Add(String, Object) Add(String, Object) Add(String, Object) Add(String, Object)

Adds an item to the session-state collection.

Clear() Clear() Clear() Clear()

Removes all keys and values from the session-state collection.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) 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) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that can be used to read all the session-state variable names in the current session.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(String) Remove(String) Remove(String) Remove(String)

Deletes an item from the session-state collection.

RemoveAll() RemoveAll() RemoveAll() RemoveAll()

Removes all keys and values from the session-state collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Deletes the item at the specified index from the session-state collection.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to