Table of Contents

Class CommandNameFromTypeConvention

Namespace
McMaster.Extensions.CommandLineUtils.Conventions
Assembly
McMaster.Extensions.CommandLineUtils.dll

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. AddCommand => "add" RemoveItemCommand => "remove-item"

public class CommandNameFromTypeConvention : IConvention
Inheritance
object
CommandNameFromTypeConvention
Implements

Methods

Apply(ConventionContext)

Apply the convention.

public void Apply(ConventionContext context)

Parameters

context ConventionContext

The context in which the convention is applied.