Exemplo n.º 1
0
        internal void Assign(DashboardContext context)
        {
            Request = context.Request;
            Response = context.Response;

            Storage = context.Storage;
            AppPath = context.Options.AppPath;
            StatsPollingInterval = context.Options.StatsPollingInterval;
            Url = new UrlHelper(context);

            _statisticsLazy = new Lazy<StatisticsDto>(() =>
            {
                var monitoring = Storage.GetMonitoringApi();
                return monitoring.GetStatistics();
            });
        }
Exemplo n.º 2
0
        internal void Assign(RequestDispatcherContext context)
        {
            var owinContext = new OwinContext(context.OwinEnvironment);

            Request = owinContext.Request;
            Response = owinContext.Response;
            Storage = context.JobStorage;
            AppPath = context.AppPath;
            Url = new UrlHelper(context.OwinEnvironment);

            _statisticsLazy = new Lazy<StatisticsDto>(() =>
            {
                var monitoring = Storage.GetMonitoringApi();
                return monitoring.GetStatistics();
            });
        }