public NetworkDispatch(Configuration configuration, StarlightServer server) : base(typeof(NetworkDispatch).Assembly) { this.configuration = configuration; this.server = server; this.connectedUserManager = new ConnectedUserManager(); }
public RequestContext(int connectionId, Configuration configuration, StarlightServer server, ConnectedUserManager connectedUserManager) { this.ConnectionId = connectionId; this.Configuration = configuration; this.Server = server; this.ConnectedUserManager = connectedUserManager; this.DbContext = DbContextFactory.CreateApplicationDbContext(configuration.ConnectionString); if (this.ConnectedUserManager.TryGetUser(connectionId, out var user)) { this.User = user; } }