public ChatSessionProxy Chat_GetChatSessionByUserID(int userID, int targetUserID) { if (!CheckClient()) { return(null); } ChatSession session = ChatBO.Instance.GetChatSession(userID, targetUserID); return(ProxyConverter.GetChatSessionProxy(session)); }
public ChatSessionProxy Chat_GetChatSession(int sessionID) { if (!CheckClient()) { return(null); } ChatSession session = ChatBO.Instance.GetChatSession(sessionID); return(ProxyConverter.GetChatSessionProxy(session)); }
public List <ChatSessionProxy> Chat_GetChatSessionsWithUnreadMessages(int userID, int topCount) { if (!CheckClient()) { return(null); } ChatSessionCollection sessions = ChatBO.Instance.GetChatSessionsWithUnreadMessages(userID, topCount); List <ChatSessionProxy> result = new List <ChatSessionProxy>(); foreach (ChatSession s in sessions) { result.Add(ProxyConverter.GetChatSessionProxy(s)); } return(result); }
public List <ChatSessionProxy> Chat_GetChatSessions(int userID, int pageNumber, int pageSize, out int totalCount) { totalCount = 0; if (!CheckClient()) { return(null); } ChatSessionCollection sessions = ChatBO.Instance.GetChatSessions(userID, pageNumber, pageSize); List <ChatSessionProxy> result = new List <ChatSessionProxy>(); foreach (ChatSession s in sessions) { result.Add(ProxyConverter.GetChatSessionProxy(s)); } totalCount = sessions.TotalRecords; return(result); }
public List <ChatSessionProxy> Chat_AdminGetSessions(int userID, MaxLabs.Passport.Proxy.DataForSearchChatSession filter, int pageNumber) { if (!CheckClient()) { return(null); } ChatSessionCollection sessions = ChatBO.Instance.Server_AdminGetSessions(userID, filter, pageNumber); List <ChatSessionProxy> result = new List <ChatSessionProxy>(); foreach (ChatSession s in sessions) { result.Add(ProxyConverter.GetChatSessionProxy(s)); } return(result); }