Skip to content

T_CommandLine_Parser

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

Parser Class

Provides methods to parse command line arguments.

Inheritance Hierarchy

System.Object
  CommandLine.Parser
Namespace: CommandLine
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public class Parser : IDisposable

VB

Public Class Parser
	Implements IDisposable

C++

public ref class Parser : IDisposable

F#

type Parser =  
    class
        interface IDisposable
    end

The Parser type exposes the following members.

Constructors

 

Name Description
Private methodStatic member Parser
Public method Parser() Initializes a new instance of the Parser class.
Protected method Parser(ParserSettings) Initializes a new instance of the Parser class
Public method Parser(Action(ParserSettings)) Initializes a new instance of the Parser class, configurable with ParserSettings using a delegate.
  Back to Top

Properties

 

Name Description
Public propertyStatic member Default Gets the singleton instance created with basic defaults.
Public property Settings Gets the instance that implements ParserSettings in use.
  Back to Top

Methods

 

Name Description
Private methodStatic member DisplayHelp(T)
Public method Dispose() Frees resources owned by the instance.
Private method Dispose(Boolean) Releases the unmanaged resources used by the Parser and optionally releases the managed resources
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Finalizes an instance of the Parser class. (Overrides Object.Finalize().)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Private methodStatic member HandleUnknownArguments
Private methodStatic member MakeParserResult(T)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ParseArguments(IEnumerable(String), Type[]) Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from the array of types supplied by types. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array.
Public method ParseArguments(T)(IEnumerable(String)) Parses a string array of command line arguments constructing values in an instance of type T. Grammar rules are defined decorating public properties with appropriate attributes.
Public method ParseArguments(T)(Func(T), IEnumerable(String)) Parses a string array of command line arguments constructing values in an instance of type T. Grammar rules are defined decorating public properties with appropriate attributes.
Private methodStatic member Tokenize
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method FormatCommandLine(T)(T) Overloaded.
Format a command line argument string from a parsed instance. (Defined by UnParserExtensions.)
Public Extension Method FormatCommandLine(T)(T, Action(UnParserSettings)) Overloaded.
Format a command line argument string from a parsed instance. (Defined by UnParserExtensions.)
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
Public Extension Method ParseArguments(T1, T2, T3, T4, T5, T6, T7, T8, T9)(IEnumerable(String)) Overloaded.
Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. Grammar rules are defined decorating public properties with appropriate attributes. The VerbAttribute must be applied to types in the array. (Defined by ParserExtensions.)
  Back to Top

See Also

Reference

CommandLine Namespace

Clone this wiki locally