AddStartupTask(ISiloBuilder, Func<IServiceProvider, CancellationToken, Task>, int)
staticextension
public static ISiloBuilder AddStartupTask(this ISiloBuilder builder, Func<IServiceProvider, CancellationToken, Task> startupTask, int stage = 20000) Adds a startup task to be executed when the silo has started.
Parameters
builderISiloBuilder- The builder.
startupTaskFunc<IServiceProvider, CancellationToken, Task>- The startup task.
stageint- The stage to execute the startup task, see values in
ServiceLifecycleStage.
Returns
The provided
ISiloBuilder. 