Table of Contents

CliResult.Create Method

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Create<TDefinition>()

Creates a new instance of the command definition class but without any binding. This is useful for example when you need to instantiate a definition class when using dependency injection.

public TDefinition Create<TDefinition>()

Returns

TDefinition

An instance of the definition class.

Type Parameters

TDefinition

The definition class for the command. A command builder for this class should be automatically generated by the source generator.

Create(Type)

Creates a new instance of the command definition class but without any binding. This is useful for example when you need to instantiate a definition class when using dependency injection.

public object Create(Type definitionType)

Parameters

definitionType Type

The definition class type for the command. A command builder for this class should be automatically generated by the source generator.

Returns

object

An instance of the definition class.