C# Class Couchbase.AspNet.SessionState.SessionStateItem

Internal class for handling the storage of the session items in Couchbase
Mostrar archivo Open project: couchbaselabs/couchbase-aspnet Class Usage Examples

Public Properties

Property Type Description
Data System.Web.SessionState.SessionStateItemCollection
DataCas ulong
Flag SessionStateActions
HeadCas ulong
LockId ulong
LockTime System.DateTime
Timeout int

Public Methods

Method Description
Load ( IBucket bucket, string id, bool metaOnly ) : SessionStateItem

Loads a session state item from the bucket

Load ( string headerPrefix, string dataPrefix, IBucket bucket, string id, bool metaOnly ) : SessionStateItem

Loads a session state item from the bucket. This function is publicly accessible so that you have direct access to session data from another application if necesssary. We use this so our front end code can determine if an employee is logged into our back end application to give them special permissions, without the session data being actually common between the two applications.

Remove ( IBucket bucket, string id ) : void

Removes a session store item from the bucket

SaveAll ( IBucket bucket, string id, bool useCas, bool &keyNotFound ) : bool

Saves the session store into Couchbase

SaveData ( IBucket bucket, string id, bool useCas, ResponseStatus &status ) : bool

Saves the session store data into Couchbase

SaveHeader ( IBucket bucket, string id, bool useCas, ResponseStatus &status ) : bool

Saves the session store header into Couchbase

ToStoreData ( HttpContext context ) : System.Web.SessionState.SessionStateStoreData

Creates a session store data object from the session data

Private Methods

Method Description
LoadHeader ( Stream s ) : SessionStateItem

Loads a sessions store header data from the passed in stream

WriteHeader ( Stream s ) : void

Writes the header to the stream

Method Details

Load() public static method

Loads a session state item from the bucket
public static Load ( IBucket bucket, string id, bool metaOnly ) : SessionStateItem
bucket IBucket Couchbase bucket to load from
id string Session ID
metaOnly bool True to load only meta data
return SessionStateItem

Load() public static method

Loads a session state item from the bucket. This function is publicly accessible so that you have direct access to session data from another application if necesssary. We use this so our front end code can determine if an employee is logged into our back end application to give them special permissions, without the session data being actually common between the two applications.
public static Load ( string headerPrefix, string dataPrefix, IBucket bucket, string id, bool metaOnly ) : SessionStateItem
headerPrefix string Prefix for the header data
dataPrefix string Prefix for the real data
bucket IBucket Couchbase bucket to load from
id string Session ID
metaOnly bool True to load only meta data
return SessionStateItem

Remove() public static method

Removes a session store item from the bucket
public static Remove ( IBucket bucket, string id ) : void
bucket IBucket Bucket to remove from
id string Session ID
return void

SaveAll() public method

Saves the session store into Couchbase
public SaveAll ( IBucket bucket, string id, bool useCas, bool &keyNotFound ) : bool
bucket IBucket Couchbase bucket to save to
id string Session ID
useCas bool True to use a check and set, false to simply store it
keyNotFound bool True if is returned for the body or the header.
return bool

SaveData() public method

Saves the session store data into Couchbase
public SaveData ( IBucket bucket, string id, bool useCas, ResponseStatus &status ) : bool
bucket IBucket Couchbase bucket to save to
id string Session ID
useCas bool True to use a check and set, false to simply store it
status ResponseStatus The from the server.
return bool

SaveHeader() public method

Saves the session store header into Couchbase
public SaveHeader ( IBucket bucket, string id, bool useCas, ResponseStatus &status ) : bool
bucket IBucket Couchbase bucket to save to
id string Session ID
useCas bool True to use a check and set, false to simply store it
status ResponseStatus
return bool

ToStoreData() public method

Creates a session store data object from the session data
public ToStoreData ( HttpContext context ) : System.Web.SessionState.SessionStateStoreData
context System.Web.HttpContext HttpContext to use
return System.Web.SessionState.SessionStateStoreData

Property Details

Data public_oe property

public SessionStateItemCollection,System.Web.SessionState Data
return System.Web.SessionState.SessionStateItemCollection

DataCas public_oe property

public ulong DataCas
return ulong

Flag public_oe property

public SessionStateActions Flag
return SessionStateActions

HeadCas public_oe property

public ulong HeadCas
return ulong

LockId public_oe property

public ulong LockId
return ulong

LockTime public_oe property

public DateTime,System LockTime
return System.DateTime

Timeout public_oe property

public int Timeout
return int