Exemplo n.º 1
0
        public NetworkDispatch(Configuration configuration, StarlightServer server) : base(typeof(NetworkDispatch).Assembly)
        {
            this.configuration = configuration;
            this.server        = server;

            this.connectedUserManager = new ConnectedUserManager();
        }
Exemplo n.º 2
0
        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;
            }
        }