Skip to content

ServiceProviderExtensions

public static class ServiceProviderExtensions

Namespace: RhoMicro.BindSight.Services

Inheritance:

Provides extensions for IServiceProvider.

RunBindSight(IServiceProvider, CancellationToken)
Section titled “RunBindSight(IServiceProvider, CancellationToken)”
public static Task<bool> RunBindSight(this IServiceProvider serviceProvider, [CancellationToken cancellationToken = default(CancellationToken)])

Runs the options docs generators registered to the service provider.

NameTypeDescription
cancellationTokenCancellationTokenThe cancellation token used to request the running of generators to be cancelled.
serviceProviderIServiceProviderThe service provider whose registered options docs generators to run.

A task, which, upon completion, will contain information on whether the generators runner actually did run. The task will complete upon all generators having ran or the runner exiting early due to IBindSightRunnerOptions.ExitOnCancellation.