C# Class ServiceStack.Redis.Tests.CachedUserSessionManager

Datei anzeigen Open project: ServiceStack/ServiceStack.Redis

Public Methods

Method Description
CachedUserSessionManager ( ICacheClient cacheClient ) : System
GetOrCreateSession ( System.Guid userId, string userName, string shardId ) : UserSession

Gets or create a user session if one doesn't exist.

GetUserClientSession ( System.Guid userId, System.Guid clientSessionId ) : UserClientSession

Gets the user client session identified by the id if exists otherwise null.

GetUserSession ( System.Guid userId ) : UserSession

Gets the user session if it exists or null.

RemoveClientSession ( System.Guid userId, ICollection clientSessionIds ) : void

Removes the client session.

StoreClientSession ( System.Guid userId, string userName, string shardId, string ipAddress, string base64ClientModulus, System.Guid userClientGlobalId ) : UserClientSession

Adds a new client session. Should this be changed to GetOrCreateClientSession?

UpdateUserSession ( UserSession userSession ) : void

Updates the UserSession in the cache, or removes expired ones.

Private Methods

Method Description
LogIfDebug ( string fmt ) : void

Method Details

CachedUserSessionManager() public method

public CachedUserSessionManager ( ICacheClient cacheClient ) : System
cacheClient ICacheClient
return System

GetOrCreateSession() public method

Gets or create a user session if one doesn't exist.
public GetOrCreateSession ( System.Guid userId, string userName, string shardId ) : UserSession
userId System.Guid The user global id.
userName string Title of the user.
shardId string
return UserSession

GetUserClientSession() public method

Gets the user client session identified by the id if exists otherwise null.
public GetUserClientSession ( System.Guid userId, System.Guid clientSessionId ) : UserClientSession
userId System.Guid The user global id.
clientSessionId System.Guid The client session id.
return UserClientSession

GetUserSession() public method

Gets the user session if it exists or null.
public GetUserSession ( System.Guid userId ) : UserSession
userId System.Guid The user global id.
return UserSession

RemoveClientSession() public method

Removes the client session.
public RemoveClientSession ( System.Guid userId, ICollection clientSessionIds ) : void
userId System.Guid The user global id.
clientSessionIds ICollection The client session ids.
return void

StoreClientSession() public method

Adds a new client session. Should this be changed to GetOrCreateClientSession?
public StoreClientSession ( System.Guid userId, string userName, string shardId, string ipAddress, string base64ClientModulus, System.Guid userClientGlobalId ) : UserClientSession
userId System.Guid The user global id.
userName string Title of the user.
shardId string
ipAddress string The ip address.
base64ClientModulus string The base64 client modulus.
userClientGlobalId System.Guid The user client global id.
return UserClientSession

UpdateUserSession() public method

Updates the UserSession in the cache, or removes expired ones.
public UpdateUserSession ( UserSession userSession ) : void
userSession UserSession The user session.
return void