Class QuartzDashboardServiceCollectionExtensions
- Namespace
- Quartz
- Assembly
- Quartz.Dashboard.dll
Registers the Quartz.NET Dashboard's services.
public static class QuartzDashboardServiceCollectionExtensions
- Inheritance
-
QuartzDashboardServiceCollectionExtensions
- Inherited Members
Methods
AddQuartzDashboard(IServiceCollection, Action<QuartzDashboardOptions>?)
Registers everything the dashboard renders with — its Blazor components, its SignalR hub, the execution history, the live event stream and the IQuartzApiClient the pages read.
public static IServiceCollection AddQuartzDashboard(this IServiceCollection services, Action<QuartzDashboardOptions>? configure = null)
Parameters
servicesIServiceCollectionThe service collection.
configureAction<QuartzDashboardOptions>Configures the dashboard, including the path it is served under.
Returns
- IServiceCollection
The same collection, so calls can be chained.
Remarks
No option points the dashboard at a scheduler: it renders the schedulers this application
registered — one registered with AddQuartzHttpClient included, which runs in another
process. The client is registered with TryAdd, so an application that registers its own
IQuartzApiClient first is the one the pages read. Call
MapQuartzDashboard() on the built application to map the endpoints.
The history is Quartz's: this calls AddQuartzExecutionHistory(), whose recorder writes what
every scheduler in the container runs and misses. IDashboardHistoryStore is still
the dashboard's seam and still works — AddHistory(IServiceCollection) says which way the pair is
joined.
So are the live events: this calls AddQuartzSchedulerEvents(), and the Live Logs page reads
the stream that installs — in this process for a local scheduler, and over the HTTP API's event
route for one registered with AddQuartzHttpClient. The page needs no connection back to the
dashboard's own hub, which is what used to fail behind a reverse proxy; the hub is still served and
still fed, for clients of your own.
Exceptions
- ArgumentNullException
servicesis null.