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(); }); }
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(); }); }