Method AddCommandLineSettingsFluentValidation
- Namespace
- Ploch.CommandLine.Spectre.FluentValidation
- Assembly
- Ploch.CommandLine.Spectre.FluentValidation.dll
AddCommandLineSettingsFluentValidation(IServiceCollection, Action<AssemblyListBuilder>)
Registers FluentValidation as the command settings validator and discovers validators from the
assemblies selected by validatorAssembliesBuilderAction.
public static IServiceCollection AddCommandLineSettingsFluentValidation(this IServiceCollection services, Action<AssemblyListBuilder> validatorAssembliesBuilderAction)
Parameters
servicesIServiceCollectionThe service collection to add the registrations to.
validatorAssembliesBuilderActionAction<AssemblyListBuilder>A delegate selecting the assemblies scanned for validators.
Returns
- IServiceCollection
The same
servicesinstance, to allow chaining.