CommandInfoTryCreate Method

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

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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

CommandInfo
If the type specified by commandType implements the ICommand interface, has the CommandAttribute attribute, and is not , a CommandInfo class with information about the command; otherwise, .

Exceptions

ArgumentNullExceptioncommandType or manager is .

See Also