Skip to content

ReplStartupBuilder

Declares preparation configuration, frozen on the first preparation.

public sealed class ReplStartupBuilder

Configures options used for preparation and imported into created applications.

public ReplStartupBuilder Options(Action<ReplOptions> configure)
  • configure (Action<ReplOptions>): Configuration callback; it must be safe to apply to independent applications.

ReplStartupBuilder - The builder.

Normalizes and prepares an independent invocation without constructing application services.

public ValueTask<PreparedReplStartup> PrepareAsync(string[] args, CancellationToken cancellationToken = default)

ValueTask<PreparedReplStartup> - A snapshot or a terminal result usable before application construction.

UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)

Section titled “UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)”

Adds an argument adapter that also transfers to the application’s interactive pipeline.

public ReplStartupBuilder UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult> adapter)
  • adapter (Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>): Argument adapter.

ReplStartupBuilder - The builder.

UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)

Section titled “UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)”

Adds an argument adapter that also transfers to the application’s interactive pipeline.

public ReplStartupBuilder UseArgumentPreprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>> adapter)
  • adapter (Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>): Argument adapter.

ReplStartupBuilder - The builder.

Declares a typed global option group once for preparation and execution.

public ReplStartupBuilder UseGlobalOptions<T>() where T : class, new()
  • T: Options type.

ReplStartupBuilder - The builder.

Adds an ordered preparation hook. Application services are not available here.

public ReplStartupBuilder UsePreparationHook(Delegate hook)
  • hook (Delegate): Hook returning an argument decision, synchronously or asynchronously.

ReplStartupBuilder - The builder.