Class SubcommandMetadata
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
Metadata about a subcommand, extracted at compile time or via reflection.
public sealed class SubcommandMetadata
- Inheritance
-
objectSubcommandMetadata
Constructors
SubcommandMetadata(Type)
Initializes a new instance of the SubcommandMetadata class.
public SubcommandMetadata(Type subcommandType)
Parameters
subcommandTypeTypeThe type of the subcommand.
Properties
CommandName
The command name (if specified, otherwise derived from type name).
public string? CommandName { get; init; }
Property Value
MetadataProviderFactory
Factory to get the metadata provider for the subcommand type. This avoids reflection when the subcommand also has generated metadata.
public Func<ICommandMetadataProvider>? MetadataProviderFactory { get; init; }
Property Value
SubcommandType
The type of the subcommand.
public Type SubcommandType { get; }