C# 클래스 HandCoded.Framework.Option

The Option class provide a basic command line processing capability. Instances of Option define the keywords to look for and the presence of associated parameters. The application should pass the entire set of command line strings recieved from Main to the processing function. The state of any option referenced by the strings is updated and any remaining strings are returned to the caller.
파일 보기 프로젝트 열기: formicary/fpml-toolkit-csharp

공개 메소드들

메소드 설명
DescribeOptions ( ) : void

Prints out a description of the options and thier parameters.

ListOptions ( ) : string

Returns a string describing the available command line options.

Option ( string name, string description ) : System

Constructs a Option instance for an option that does not have a parameter.

Option ( string name, string description, string parameter ) : System

Constructs a Option instance for an option that has an associated parameter value (e.g. -output <file>).

ProcessArguments ( string arguments ) : string[]

Processes the command line arguments to extract options and parameter values.

ToString ( ) : string

Converts the instance data members to a string representation that can be displayed for debugging purposes.

보호된 메소드들

메소드 설명
ToDebug ( ) : string

Converts the instance's member values to string representations and concatenates them all together. This function is used by ToString and my be overwritten in derived classes.

메소드 상세

DescribeOptions() 공개 정적인 메소드

Prints out a description of the options and thier parameters.
public static DescribeOptions ( ) : void
리턴 void

ListOptions() 공개 정적인 메소드

Returns a string describing the available command line options.
public static ListOptions ( ) : string
리턴 string

Option() 공개 메소드

Constructs a Option instance for an option that does not have a parameter.
public Option ( string name, string description ) : System
name string The name of the option (e.g. -help).
description string A description of the options purpose.
리턴 System

Option() 공개 메소드

Constructs a Option instance for an option that has an associated parameter value (e.g. -output <file>).
public Option ( string name, string description, string parameter ) : System
name string The name of the option (e.g. -output).
description string A description of the options purpose.
parameter string A description of the required parameter or /// null if none allowed.
리턴 System

ProcessArguments() 공개 정적인 메소드

Processes the command line arguments to extract options and parameter values.
public static ProcessArguments ( string arguments ) : string[]
arguments string The command line arguments pass to Main
리턴 string[]

ToDebug() 보호된 메소드

Converts the instance's member values to string representations and concatenates them all together. This function is used by ToString and my be overwritten in derived classes.
protected ToDebug ( ) : string
리턴 string

ToString() 공개 메소드

Converts the instance data members to a string representation that can be displayed for debugging purposes.
public ToString ( ) : string
리턴 string