Skip to content

BindSightGeneratorRunner

public sealed class BindSightGeneratorRunner

Namespace: RhoMicro.BindSight.Generators

Inheritance:

Runs options docs generators.

BindSightGeneratorRunner(IBindSightRunnerOptions, IBindSightGeneratorOptionsProvider, IEnumerable<IBindSightGenerator>, ILogger<BindSightGeneratorRunner>, IHostApplicationLifetime)
Section titled “BindSightGeneratorRunner(IBindSightRunnerOptions, IBindSightGeneratorOptionsProvider, IEnumerable<IBindSightGenerator>, ILogger<BindSightGeneratorRunner>, IHostApplicationLifetime)”
public BindSightGeneratorRunner(IBindSightRunnerOptions options, IBindSightGeneratorOptionsProvider optionsProvider, IEnumerable<IBindSightGenerator> generators, ILogger<BindSightGeneratorRunner> logger, IHostApplicationLifetime hostLifetime)

Runs options docs generators.

NameTypeDescription
generatorsIEnumerable<IBindSightGenerator>The generators to run.
hostLifetimeIHostApplicationLifetimeThe lifetime of the service host, to be used when exiting with the ExitMode.Host mode.
loggerILogger<BindSightGeneratorRunner>The logger to use.
optionsIBindSightRunnerOptionsThe options to use when running generators.
optionsProviderIBindSightGeneratorOptionsProviderThe the generator options provider to use when running generators.
public Task<bool> Run([CancellationToken cancellationToken = default(CancellationToken)])

Runs the generator runner.

NameTypeDescription
cancellationTokenCancellationTokenThe cancellation token used to request the running of generators to be cancelled.

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.