Files

27 lines
481 B
C#

using System.Collections.Generic;
namespace ServerLib.Service;
public class SessionManager
{
public Dictionary<int, Session> Sessions
{
get;
}
public SessionManager()
{
Sessions = new Dictionary<int, Session>();
}
public void AddSession(Session session)
{
Sessions.Add(session.GetHashCode(), session);
}
public void RemoveSession(Session session)
{
Sessions.Remove(session.GetHashCode());
}
}