Namespace McMaster.Extensions.CommandLineUtils.Conventions
Classes
AppNameFromEntryAssemblyConvention
Sets Name using the name of the entry assembly to the current application. It is only applied if the name is null.
ArgumentAttributeConvention
Adds a Command
AttributeConvention
Searches the model type and its members for attributes that implement IMember
CommandAttributeConvention
Adds settings from Command
CommandNameFromTypeConvention
Sets the command name based on the model type, if is not otherwise set.
This attempts to infer a command name using a few rules, such as using kebab-case
and trimming "Command" from the name of the type.
ConstructorInjectionConvention
Uses an instance of System.
ConventionContext
The context in which a convention is applied.
DefaultHelpOptionConvention
Adds a help option of --help if no other help option is specified.
ExecuteMethodConvention
Sets McOnExecute
or OnExecuteAsync
on the model type
of CommandLineApplication<TModel>.
HelpOptionAttributeConvention
Sets Option
OptionAttributeConvention
Adds an Command
OptionAttributeConventionBase<TAttribute>
Shared implementation for adding conventions based on Option
ParentPropertyConvention
Sets a property named Parent
on the model type to the value
of the model of the parent command.
RemainingArgsPropertyConvention
Sets a property named RemainingArguments
or RemainingArgs
on the model type on CommandLineApplication<TModel>
to the value of Remaining
SubcommandAttributeConvention
Creates a subcommand for each Subcommand
SubcommandPropertyConvention
Sets a property named Subcommand
to the value of the selected subcommand
model type of CommandLineApplication<TModel>.
ValidationErrorMethodConvention
Invokes a method named OnValidationError
on the model type of CommandLineApplication<TModel>
to handle validation errors.
VersionOptionAttributeConvention
Sets Option
VersionOptionFromMemberAttributeConvention
Sets Option
Interfaces
IConvention
Defines a convention for an instance of CommandLineApplication<TModel>.
IConventionBuilder
Builds a collection of conventions.
IMemberConvention
Defines a convention that is implemented as an attribute on a model type.