Table of Contents

Class UnrecognizedCommandParsingException

Namespace
McMaster.Extensions.CommandLineUtils
Assembly
McMaster.Extensions.CommandLineUtils.dll

The exception that is thrown when an invalid argument is given and when we can make suggestions about similar, valid commands or options.

public class UnrecognizedCommandParsingException : CommandParsingException, ISerializable
Inheritance
object
UnrecognizedCommandParsingException
Implements
Inherited Members

Constructors

UnrecognizedCommandParsingException(CommandLineApplication, IEnumerable<string>, string)

Initializes an instance of UnrecognizedCommandParsingException.

public UnrecognizedCommandParsingException(CommandLineApplication command, IEnumerable<string> nearestMatches, string message)

Parameters

command CommandLineApplication
nearestMatches IEnumerable<string>

The options or commands that

message string

Properties

NearestMatches

A collection of strings representing suggestions about similar and valid commands or options for the invalid argument that caused this UnrecognizedCommandParsingException.

public IEnumerable<string> NearestMatches { get; }

Property Value

IEnumerable<string>

This property get/set the suggestions for an invalid argument.

Remarks

This property always be empty MakeSuggestionsInErrorMessage is false.