AddCustomResultValidatorsExtensions Class

Definition

Provides extension methods to customise result validators for CliInvoke.

public static class AddCustomResultValidatorsExtensions

Remarks

These methods follow a single-threaded registration convention: IServiceCollection is not thread-safe by design and is intended to be populated during application startup before the service provider is built. No locking is added.

Each call removes any existing validator for the given process result type via RemoveAll and then adds the new registration with Add, so the last registration wins. Calling these methods after the service provider has been built is not supported.