Skip to main content

ISessionFactory

Retrieves a User Session

Assembly: ServiceStack.Interfaces.dll​
View Source​
Declaration
public interface ISessionFactory

Methods​

GetOrCreateSession(IRequest, IResponse)​

Gets the Session Bag for this request, creates one if it doesn't exist.

View Source​
Declaration
ISession GetOrCreateSession(IRequest httpReq, IResponse httpRes)
Returns​

ServiceStack.Caching.ISession

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes

GetOrCreateSessionAsync(IRequest, IResponse)​

View Source​
Declaration
ISessionAsync GetOrCreateSessionAsync(IRequest httpReq, IResponse httpRes)
Returns​

ServiceStack.Caching.ISessionAsync

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes

GetOrCreateSession()​

Gets the Session Bag for this request, creates one if it doesn't exist. Only for ASP.NET apps. Uses the HttpContext.Current singleton.

View Source​
Declaration
ISession GetOrCreateSession()
Returns​

ServiceStack.Caching.ISession

GetOrCreateSessionAsync()​

View Source​
Declaration
ISessionAsync GetOrCreateSessionAsync()
Returns​

ServiceStack.Caching.ISessionAsync

CreateSession(String)​

Create a Session Bag using a custom sessionId

View Source​
Declaration
ISession CreateSession(string sessionId)
Returns​

ServiceStack.Caching.ISession

Parameters​
TypeName
System.StringsessionId

CreateSessionAsync(String)​

View Source​
Declaration
ISessionAsync CreateSessionAsync(string sessionId)
Returns​

ServiceStack.Caching.ISessionAsync

Parameters​
TypeName
System.StringsessionId