C# Class CgwMonitorManage.Service.SessionManage

Exibir arquivo Open project: eSDK/esdk_Cgw Class Usage Examples

Public Methods

Method Description
AddSession ( System.Guid sessionGuid, CgwSession smcSession ) : SmcErr

添加会话

GetSessionsBySessionId ( string sessionId, CgwSession &sessions ) : SmcErr

根据sessionId获取session

GetSessionsCount ( ) : int

获取Session个数

Instance ( ) : SessionManage

单实例模式

RemoveAllSession ( ) : void

删除会话

RemoveSession ( System.Guid sessionGuid ) : SmcErr

删除会话

RemoveSessionBySessionId ( string sessionId ) : SmcErr

删除会话

Private Methods

Method Description
SessionManage ( ) : System

构造函数

timeoutTimer_Elapsed ( object sender, System e ) : void

定时清理过期会话

Method Details

AddSession() public method

添加会话
public AddSession ( System.Guid sessionGuid, CgwSession smcSession ) : SmcErr
sessionGuid System.Guid 会话GuidID
smcSession CgwSession 会话数据
return CgwMonitorManage.SmcError.SmcErr

GetSessionsBySessionId() public method

根据sessionId获取session
public GetSessionsBySessionId ( string sessionId, CgwSession &sessions ) : SmcErr
sessionId string sessionId
sessions CgwSession session
return CgwMonitorManage.SmcError.SmcErr

GetSessionsCount() public method

获取Session个数
public GetSessionsCount ( ) : int
return int

Instance() public static method

单实例模式
public static Instance ( ) : SessionManage
return SessionManage

RemoveAllSession() public method

删除会话
public RemoveAllSession ( ) : void
return void

RemoveSession() public method

删除会话
public RemoveSession ( System.Guid sessionGuid ) : SmcErr
sessionGuid System.Guid 会话Guid
return CgwMonitorManage.SmcError.SmcErr

RemoveSessionBySessionId() public method

删除会话
public RemoveSessionBySessionId ( string sessionId ) : SmcErr
sessionId string
return CgwMonitorManage.SmcError.SmcErr