public static bool HasSession(long id) { lock (MyAVSession.sessions) { return MyAVSession.sessions.ContainsKey(id); } }