Skip to content

SiloBuilderStartupExtensions Methods

The silo builder startup extensions.

AddStartupTask(ISiloBuilder, Func<IServiceProvider, CancellationToken, Task>, int)

staticextension
View source
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.