/// <summary> /// ctor. /// </summary> public SiteRootUrlMiddleware(RequestDelegate next, IThisApplication thisApplication) { thisApplication.CheckArgumentNull(nameof(thisApplication)); _next = next; _thisApplication = thisApplication; }
/// <summary> /// Scheduled Tasks Manager /// </summary> public ScheduledTasksCoordinator( ILogger <ScheduledTasksCoordinator> logger, IApplicationLifetime applicationLifetime, IOptions <ScheduledTasksStorage> tasksStorage, IJobsRunnerTimer jobsRunnerTimer, IThisApplication thisApplication, IServiceProvider serviceProvider) { logger.CheckArgumentNull(nameof(logger)); applicationLifetime.CheckArgumentNull(nameof(applicationLifetime)); tasksStorage.CheckArgumentNull(nameof(tasksStorage)); jobsRunnerTimer.CheckArgumentNull(nameof(jobsRunnerTimer)); thisApplication.CheckArgumentNull(nameof(thisApplication)); serviceProvider.CheckArgumentNull(nameof(serviceProvider)); _logger = logger; _tasksStorage = tasksStorage; _jobsRunnerTimer = jobsRunnerTimer; _thisApplication = thisApplication; _serviceProvider = serviceProvider; applicationLifetime.ApplicationStopping.Register(() => { _logger.LogInformation("Application is stopping ... ."); disposeResources().Wait(); }); }
/// <summary> /// DNTScheduler needs a ping service to keep it alive. /// </summary> public PingTask(IThisApplication thisApplication) { _thisApplication = thisApplication; }