CommandManagerGetCommands Method

Gets information about all the commands managed by this instance.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public IEnumerable<CommandInfo> GetCommands()

Return Value

IEnumerableCommandInfo
Information about every subcommand defined in the assemblies, ordered by command name.

Remarks

Commands that don't meet the criteria of the CommandOptionsCommandFilter predicate are not returned.

If the CommandOptionsParentCommand property is , only commands without a ParentCommandAttribute attribute are returned. If it is not , only commands where the type specified using the ParentCommandAttribute attribute matches the value of the property are returned.

The automatic version command is returned if the CommandOptionsAutoVersionCommand property is and the command name matches the name of the automatic version command, and not any other command name. The CommandOptionsCommandFilter and CommandOptionsParentCommand property also affect whether the version command is returned.

See Also