Table of Contents

CliCommandBuilder Class

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Represents a command builder generated by the source generator.

public abstract class CliCommandBuilder
Inheritance
CliCommandBuilder

Constructors

CliCommandBuilder()

Initializes a new instance of the CliCommandBuilder class.

Properties

ChildDefinitionTypes

The child definition classes if this command builder is generated for an external parent.

Children

Gets the command builders that are nested/external children of this command builder.

DefinitionType

The definition class that this command builder is generated for.

IsRoot

Gets a value which indicates whether this command builder is for a root command.

NameAutoGenerate

Gets a value which indicates whether names are automatically generated for commands, directives, options and arguments.

NameCasingConvention

Gets the character casing convention to use for automatically generated names of commands, directives, options and arguments.

NamePrefixConvention

Gets the prefix convention to use for automatically generated names of options.

Namer

Gets the namer for generating CLI names and aliases while tracking already used ones. This will be available after Build(CliBindingContext) call.

ParentDefinitionType

The parent definition class if this command builder is generated for a nested/external child.

Parents

Gets the command builders that are nested/external parents of this command builder.

ShortFormAutoGenerate

Gets a value which indicates whether short form aliases are automatically generated names of commands and options.

ShortFormPrefixConvention

Gets the prefix convention to use for automatically generated short form aliases of options.

Methods

Build(CliBindingContext)

Builds a Command instance, populated with directives, options, arguments and settings.

BuildWithHierarchy(CliBindingContext, out RootCommand)

Builds a Command instance with full hierarchy, populated with parent-commands, sub-commands, directives, options, arguments and settings.

BuildWithParent(CliBindingContext, CliCommandBuilder)

Builds a Command instance by inheriting parent settings, populated with directives, options, arguments and settings.

DoBuild(CliBindingContext)

Builds a Command instance, populated with directives, options, arguments and settings.

Get(Type)

Gets the command builder registered for the definition class.

Get<TDefinition>()

Gets the command builder registered for the definition class.

GetChildren(Type)

Gets the command builders that are registered as nested/external children of a parent definition.

GetChildren<TParentDefinition>()

Gets the command builders that are registered as nested/external children of a parent definition.

GetParents(Type)

Gets the command builders that are registered as nested/external parents of a child definition.

GetParents<TDefinition>()

Gets the command builders that are registered as nested/external parents of a child definition.

Register()

Registers this command builder so that it can be found by the definition class, and it can be found by the parent definition class if it's a nested/external child.

Register(Type, CliCommandBuilder)

Registers a command builder so that it can be found by the definition class.

Register<TDefinition>(CliCommandBuilder)

Registers a command builder so that it can be found by the definition class.

RegisterAsChild(Type, Type)

Registers a command builder as a nested/external child so that it can be found by the parent definition class.

RegisterAsChild<TParentDefinition, TChildDefinition>()

Registers a command builder as a nested/external child so that it can be found by the parent definition class.