CommandInfo.TryCreate Method

Creates an instance of the CommandInfo structure only if commandType represents a command type.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 3.1.1
C#
public static CommandInfo? TryCreate(
	Type commandType,
	CommandManager manager
)

Parameters

commandType  Type
The type that implements the subcommand.
manager  CommandManager
The CommandManager that is managing this command.

Return Value

Nullable<CommandInfo>
A CommandInfo structure with information about the command, or null if commandType was not a command.

Exceptions

ArgumentNullExceptioncommandType or manager is null.

See Also