コード例 #1
0
        public static ProxySession Create(ClientConnection clientConnection, AccountDocument accountDocument)
        {
            long id = ProxySessionManager.GetScrambledId();

            ProxySession proxySession = new ProxySession(id, clientConnection, accountDocument);

            Logging.Assert(ProxySessionManager.m_sessions.TryAdd(id, proxySession), "ProxySessionManager.m_sessions.TryAdd(id, proxySession) return false");

            return(proxySession);
        }
コード例 #2
0
 public static void Remove(ProxySession session)
 {
     ProxySessionManager.m_sessions.TryRemove(session.Id, out _);
 }
コード例 #3
0
 public static bool TryGet(long id, out ProxySession session)
 {
     return(ProxySessionManager.m_sessions.TryGetValue(id, out session));
 }