Class Root
Represents a notional root command.
public sealed class Root
- Inheritance
-
Root
- Inherited Members
Remarks
A Root always has a LinkedCommand of type Root.
Constructors
Root(Command, Group?, SubCommand?)
Initializes a new instance.
public Root(Command linkedCommand, Group? childGroup = null, SubCommand? childSubCommand = null)
Parameters
linkedCommand
CommandThe command linked to the root.
childGroup
GroupThe child group.
childSubCommand
SubCommandThe child sub-command.
Properties
ChildGroup
The immediate child group.
public Group? ChildGroup { get; set; }
Property Value
ChildSubCommand
The child command.
public SubCommand? ChildSubCommand { get; set; }
Property Value
IsDefault
Indicates whether this root is a default root.
public bool IsDefault { get; }
Property Value
LinkedCommand
The linked command of this root.
public Command LinkedCommand { get; }
Property Value
Methods
Default(SubCommand?)
Returns the default root.
public static Root Default(SubCommand? subCommand = null)
Parameters
subCommand
SubCommandThe child sub-command.
Returns
ToString()
public override string ToString()