/// <summary> /// Initializes an instance of <see cref="HelpTextSource"/>. /// </summary> public HelpTextSource(ApplicationMetadata applicationMetadata, IReadOnlyList <CommandSchema> availableCommandSchemas, CommandSchema targetCommandSchema) { ApplicationMetadata = applicationMetadata.GuardNotNull(nameof(applicationMetadata)); AvailableCommandSchemas = availableCommandSchemas.GuardNotNull(nameof(availableCommandSchemas)); TargetCommandSchema = targetCommandSchema.GuardNotNull(nameof(targetCommandSchema)); }
/// <summary> /// Gets whether this command is the default command, i.e. without a name. /// </summary> public static bool IsDefault(this CommandSchema commandSchema) { commandSchema.GuardNotNull(nameof(commandSchema)); return(commandSchema.Name.IsNullOrWhiteSpace()); }