/// <summary> /// Creates a new session. /// </summary> internal static NetAvatarSession Create(AvatarAccount avatarAccount, byte[] sessionId) { NetAvatarSession session = new NetAvatarSession(avatarAccount, sessionId); NetAvatarSessionManager._sessions.Add(sessionId, session); return(session); }
/// <summary> /// Tries to remove the specified session. /// </summary> internal static bool TryRemove(byte[] sessionId, out NetAvatarSession session) { if (NetAvatarSessionManager._sessions.TryGetValue(sessionId, out session)) { return(NetAvatarSessionManager._sessions.Remove(sessionId)); } return(false); }
/// <summary> /// Tries to get the specified session. /// </summary> internal static bool TryGet(byte[] sessionId, out NetAvatarSession session) { return(NetAvatarSessionManager._sessions.TryGetValue(sessionId, out session)); }