/// <summary>
        ///     Creates a new <see cref="NetAccountSession"/> instance.
        /// </summary>
        internal static NetAccountSession Create(Account account, byte[] sessionId)
        {
            NetAccountSession session = new NetAccountSession(account, sessionId);

            NetAccountSessionManager._sessions.Add(sessionId, session);
            return(session);
        }
        /// <summary>
        ///     Tries to remove the <see cref="NetAccountSession"/> instance associed with the specified id.
        /// </summary>
        internal static bool TryRemove(byte[] sessionId, out NetAccountSession session)
        {
            if (NetAccountSessionManager._sessions.TryGetValue(sessionId, out session))
            {
                return(NetAccountSessionManager._sessions.Remove(sessionId));
            }

            return(false);
        }
 /// <summary>
 ///     Tries to get the <see cref="NetAccountSession"/> instance with his id.
 /// </summary>
 internal static bool TryGet(byte[] sessionId, out NetAccountSession session)
 {
     return(NetAccountSessionManager._sessions.TryGetValue(sessionId, out session));
 }