C# Class Ntreev.Library.Commands.CommandLineParser

显示文件 Open project: NtreevSoft/CommandLineParser Class Usage Examples

Private Properties

Property Type Description
Invoke void

Public Methods

Method Description
CommandLineParser ( object instance ) : System
CommandLineParser ( string name, object instance ) : System
Invoke ( string commandLine ) : bool
Parse ( string commandLine ) : bool
PrintMethodUsage ( ) : void
PrintMethodUsage ( string methodName ) : void
PrintSummary ( ) : void
PrintUsage ( ) : void
PrintVersion ( ) : void
Split ( string commandLine ) : string[]

Protected Methods

Method Description
CreateMethodUsagePrinter ( string name, object instance ) : MethodUsagePrinter
CreateSwitchUsagePrinter ( string name, object instance ) : SwitchUsagePrinter
IsMethodVisible ( MethodDescriptor descriptor ) : bool
IsSwitchVisible ( SwitchDescriptor descriptor ) : bool

Private Methods

Method Description
Invoke ( object instance, string arguments, MethodInfo methodInfo, IEnumerable switches ) : void

Method Details

CommandLineParser() public method

public CommandLineParser ( object instance ) : System
instance object
return System

CommandLineParser() public method

public CommandLineParser ( string name, object instance ) : System
name string
instance object
return System

CreateMethodUsagePrinter() protected method

protected CreateMethodUsagePrinter ( string name, object instance ) : MethodUsagePrinter
name string
instance object
return MethodUsagePrinter

CreateSwitchUsagePrinter() protected method

protected CreateSwitchUsagePrinter ( string name, object instance ) : SwitchUsagePrinter
name string
instance object
return SwitchUsagePrinter

Invoke() public method

public Invoke ( string commandLine ) : bool
commandLine string
return bool

IsMethodVisible() protected method

protected IsMethodVisible ( MethodDescriptor descriptor ) : bool
descriptor MethodDescriptor
return bool

IsSwitchVisible() protected method

protected IsSwitchVisible ( SwitchDescriptor descriptor ) : bool
descriptor SwitchDescriptor
return bool

Parse() public method

public Parse ( string commandLine ) : bool
commandLine string
return bool

PrintMethodUsage() public method

public PrintMethodUsage ( ) : void
return void

PrintMethodUsage() public method

public PrintMethodUsage ( string methodName ) : void
methodName string
return void

PrintSummary() public method

public PrintSummary ( ) : void
return void

PrintUsage() public method

public PrintUsage ( ) : void
return void

PrintVersion() public method

public PrintVersion ( ) : void
return void

Split() public static method

public static Split ( string commandLine ) : string[]
commandLine string
return string[]