Index: DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/readme.txt =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/readme.txt (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/readme.txt (revision 3069) @@ -0,0 +1,48 @@ +Command Line Parser Library 1.9.3.19 Beta +----------------------------------------- +Giacomo Stelluti Scala +(gsscoder@gmail.com) + +Codeplex: http://commandline.codeplex.com/ +GitHub (Latest Sources, Updated Docs): https://github.com/gsscoder/commandline + +Upgrading from 1.8.* versions: +------------------------------ +The major API change is that all attributes that inherits from BaseOptionAttribute now +apply only to properties. Fields are no longer supported. + +Old Code: +--------- +class Options { + [Option("o", "my-option", HelpText="This is an option!")] + public int MyOption = 10; +} + +New Code: +--------- +class Options { + [Option("o", "my-option", DefaultValue=10, HelpText="This is an option!")] + public int MyOption { get; set; } +} + +As you can see I've added the new DefaultValue property to help you initialize properties. + +Shortcut for Help Screen +------------------------ +[HelpOption] +public string GetUsage() +{ + return HelpText.AutoBuild(this, + (HelpText current) => HelpText.DefaultParsingErrorsHandler(this, current)); +} + +Note: +----- +If you don't use mutually exclusive options, now there's a singleton built for common uses: + +if (CommandLineParser.Default.ParseArguments(args, options)) { + // consume values here +} + + +Have fun! \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/CommandLine.XML =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/CommandLine.XML (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/CommandLine.XML (revision 3069) @@ -0,0 +1,868 @@ + + + + /home/giacomo/Projects/CommandLine/src/libcmdline/bin/Release/CommandLine + + + + + Provides base properties for creating an attribute, used to define rules for command line parsing. + + + + + Short name of this command line option. You can use only one character. + + + + + Long name of this command line option. This name is usually a single english word. + + + + + True if this command line option is required. + + + + + Gets or sets mapped property default value. + + + + + A short description of this command line option. Usually a sentence summary. + + + + + Indicates the instance method that must be invoked when it becomes necessary show your help screen. + The method signature is an instance method with no parameters and + return value. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + Allows you to define short and long option names. + + The short name of the option or null if not used. + The long name of the option or null if not used. + + + + Returns always false for this kind of option. + This behaviour can't be changed by design; if you try set + an will be thrown. + + + + + Models an option that can accept multiple values as separated arguments. + + + + + Initializes a new instance of the class. + + The short name of the option or null if not used. + The long name of the option or null if not used. + + + + Models an option specification. + + + + + Initializes a new instance of the class. + + The short name of the option or null if not used. + The long name of the option or null if not used. + + + + Gets or sets the option's mutually exclusive set. + + + + + Models an option that can accept multiple values. + Must be applied to a field compatible with an interface + of instances. + + + + + Initializes a new instance of the class. + + The short name of the option or null if not used. + The long name of the option or null if not used. + + + + Initializes a new instance of the class. + + The short name of the option or null if not used. + The long name of the option or null if not used. + Values separator character. + + + + Gets or sets the values separator character. + + + + + Models a list of command line arguments that are not options. + Must be applied to a field compatible with an interface + of instances. + + + + + Initializes a new instance of the class. + + A type that implements . + Thrown if is null. + + + + Gets or sets the maximum element allow for the list managed by type. + If lesser than 0, no upper bound is fixed. + If equal to 0, no elements are allowed. + + + + + Models a bad parsed option. + + + + + The short name of the option + + Returns the short name of the option. + + + + The long name of the option + + Returns the long name of the option. + + + + Models a parsing error. + + + + + Gets or a the bad parsed option. + + + The bad option. + + + + + Gets or sets a value indicating whether this violates required. + + + true if violates required; otherwise, false. + + + + + Gets or sets a value indicating whether this violates format. + + + true if violates format; otherwise, false. + + + + + Gets or sets a value indicating whether this violates mutual exclusiveness. + + + true if violates mutual exclusiveness; otherwise, false. + + + + + Models a type that records the parser state afeter parsing. + + + + + Gets a list of parsing errors. + + + Parsing errors. + + + + + Defines a basic interface to parse command line arguments. + + + + + Parses a array of command line arguments, setting values in + parameter instance's public fields decorated with appropriate attributes. + + A array of command line arguments. + An object's instance used to receive values. + Parsing rules are defined using derived types. + True if parsing process succeed. + Thrown if is null. + Thrown if is null. + + + + Parses a array of command line arguments, setting values in + parameter instance's public fields decorated with appropriate attributes. + This overload allows you to specify a derived instance for write text messages. + + A array of command line arguments. + An object's instance used to receive values. + Parsing rules are defined using derived types. + Any instance derived from , + usually . Setting this argument to null, will disable help screen. + True if parsing process succeed. + Thrown if is null. + Thrown if is null. + + + + Provides the abstract base class for a strongly typed options target. Used when you need to get parsing errors. + + + + + This exception is thrown when a generic parsing error occurs. + + + + + Specifies a set of features to configure a behavior. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class, + setting the case comparison behavior. + + If set to true, parsing will be case sensitive. + + + + Initializes a new instance of the class, + setting the used for help method output. + + Any instance derived from , + default . Setting this argument to null, will disable help screen. + + + + Initializes a new instance of the class, + setting case comparison and help output options. + + If set to true, parsing will be case sensitive. + Any instance derived from , + default . Setting this argument to null, will disable help screen. + + + + Initializes a new instance of the class, + setting case comparison and mutually exclusive behaviors. + + If set to true, parsing will be case sensitive. + If set to true, enable mutually exclusive behavior. + + + + Initializes a new instance of the class, + setting case comparison, mutually exclusive behavior and help output option. + + If set to true, parsing will be case sensitive. + If set to true, enable mutually exclusive behavior. + Any instance derived from , + default . Setting this argument to null, will disable help screen. + + + + Initializes a new instance of the class, + setting case comparison, mutually exclusive behavior and help output option. + + If set to true, parsing will be case sensitive. + If set to true, enable mutually exclusive behavior. + If set to true, allow the parser to skip unknown argument, otherwise return a parse failure + Any instance derived from , + default . Setting this argument to null, will disable help screen. + + + + Gets or sets the case comparison behavior. + Default is set to true. + + + + + Gets or sets the mutually exclusive behavior. + Default is set to false. + + + + + Gets or sets the used for help method output. + Setting this property to null, will disable help screen. + + + + + Gets or sets a value indicating if the parser shall move on to the next argument and ignore the given argument if it + encounter an unknown arguments + + + true to allow parsing the arguments with differents class options that do not have all the arguments. + + + This allows fragmented version class parsing, useful for project with addon where addons also requires command line arguments but + when these are unknown by the main program at build time. + + + + + Provides methods to parse command line arguments. + Default implementation for . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class, + configurable with a object. + + The object is used to configure + aspects and behaviors of the parser. + + + + Singleton instance created with basic defaults. + + + + + Parses a array of command line arguments, setting values in + parameter instance's public fields decorated with appropriate attributes. + + A array of command line arguments. + An object's instance used to receive values. + Parsing rules are defined using derived types. + True if parsing process succeed. + Thrown if is null. + Thrown if is null. + + + + Parses a array of command line arguments, setting values in + parameter instance's public fields decorated with appropriate attributes. + This overload allows you to specify a derived instance for write text messages. + + A array of command line arguments. + An object's instance used to receive values. + Parsing rules are defined using derived types. + Any instance derived from , + usually . Setting this argument to null, will disable help screen. + True if parsing process succeed. + Thrown if is null. + Thrown if is null. + + + + Models an abstract sentence builder. + + + + + Gets a string containing word 'option'. + + + The word 'option'. + + + + + Gets a string containing the word 'and'. + + + The word 'and'. + + + + + Gets a string containing the sentence 'required option missing'. + + + The sentence 'required option missing'. + + + + + Gets a string containing the sentence 'violates format'. + + + The sentence 'violates format'. + + + + + Gets a string containing the sentence 'violates mutual exclusiveness'. + + + The sentence 'violates mutual exclusiveness'. + + + + + Gets a string containing the error heading text. + + + The error heading text. + + + + + Creates the built in sentence builder. + + + The built in sentence builder. + + + + + Models an english sentence builder, currently the default one. + + + + + Gets a string containing word 'option' in english. + + + The word 'option' in english. + + + + + Gets a string containing the word 'and' in english. + + + The word 'and' in english. + + + + + Gets a string containing the sentence 'required option missing' in english. + + + The sentence 'required option missing' in english. + + + + + Gets a string containing the sentence 'violates format' in english. + + + The sentence 'violates format' in english. + + + + + Gets a string containing the sentence 'violates mutual exclusiveness' in english. + + + The sentence 'violates mutual exclusiveness' in english. + + + + + Gets a string containing the error heading text in english. + + + The error heading text in english. + + + + + Models the copyright informations part of an help text. + You can assign it where you assign any instance. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + specifying author and year. + + The company or person holding the copyright. + The year of coverage of copyright. + Thrown when parameter is null or empty string. + + + + Initializes a new instance of the class + specifying author and years. + + The company or person holding the copyright. + The years of coverage of copyright. + Thrown when parameter is null or empty string. + Thrown when parameter is not supplied. + + + + Initializes a new instance of the class + specifying symbol case, author and years. + + The case of the copyright symbol. + The company or person holding the copyright. + The years of coverage of copyright. + Thrown when parameter is null or empty string. + Thrown when parameter is not supplied. + + + + When overridden in a derived class, allows to specify a different copyright word. + + + + + Returns the copyright informations as a . + + The that contains the copyright informations. + + + + When overridden in a derived class, allows to specify a new algorithm to render copyright years + as a instance. + + A array of years. + A instance with copyright years. + + + + Converts the copyright informations to a . + + This instance. + The that contains the copyright informations. + + + + Models the heading informations part of an help text. + You can assign it where you assign any instance. + + + + + Initializes a new instance of the class + specifying program name. + + The name of the program. + Thrown when parameter is null or empty string. + + + + Initializes a new instance of the class + specifying program name and version. + + The name of the program. + The version of the program. + Thrown when parameter is null or empty string. + + + + Returns the heading informations as a . + + The that contains the heading informations. + + + + Writes out a string and a new line using the program name specified in the constructor + and parameter. + + The message to write. + The target derived type. + Thrown when parameter is null or empty string. + Thrown when parameter is null. + + + + Writes out a string and a new line using the program name specified in the constructor + and parameter to standard output stream. + + The message to write. + Thrown when parameter is null or empty string. + + + + Writes out a string and a new line using the program name specified in the constructor + and parameter to standard error stream. + + The message to write. + Thrown when parameter is null or empty string. + + + + Converts the heading informations to a . + + This instance. + The that contains the heading informations. + + + + Handle parsing errors delegate. + + + + + Provides data for the FormatOptionHelpText event. + + + + + Initializes a new instance of the class. + + Option to format. + + + + Gets the option to format. + + + + + Models an help text and collects related informations. + You can assign it in place of a instance. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + specifying the sentence builder. + + + A instance. + + + + + Initializes a new instance of the class + specifying heading informations. + + A string with heading information or + an instance of . + Thrown when parameter is null or empty string. + + + + Initializes a new instance of the class + specifying the sentence builder and heading informations. + + + A instance. + + + A string with heading information or + an instance of . + + + + + Initializes a new instance of the class + specifying heading and copyright informations. + + A string with heading information or + an instance of . + A string with copyright information or + an instance of . + Thrown when one or more parameters are null or empty strings. + + + + Initializes a new instance of the class + specifying heading and copyright informations. + + A string with heading information or + an instance of . + A string with copyright information or + an instance of . + The instance that collected command line arguments parsed with class. + Thrown when one or more parameters are null or empty strings. + + + + Message type enumeration. + + + + + Parsing error due to a violation of the format of an option value. + + + + + Parsing error due to a violation of mandatory option. + + + + + Parsing error due to a violation of the mutual exclusiveness of two or more option. + + + + + Occurs when an option help text is formatted. + + + + + Sets the heading information string. + You can directly assign a instance. + + + + + Sets the copyright information string. + You can directly assign a instance. + + + + + Gets or sets the maximum width of the display. This determines word wrap when displaying the text. + + The maximum width of the display. + + + + Gets or sets the format of options for adding or removing dashes. + It modifies behavior of method. + + + + + Gets or sets whether to add an additional line after the description of the option. + + + + + Creates a new instance of the class using common defaults. + + + An instance of class. + + + The instance that collected command line arguments parsed with class. + + + + + Creates a new instance of the class using common defaults. + + + An instance of class. + + + The instance that collected command line arguments parsed with class. + + + A delegate used to customize the text block for reporting parsing errors. + + + + + Adds a text line after copyright and before options usage informations. + + A instance. + Thrown when parameter is null or empty string. + + + + Adds a text line at the bottom, after options usage informations. + + A instance. + Thrown when parameter is null or empty string. + + + + Adds a text block with options usage informations. + + The instance that collected command line arguments parsed with class. + Thrown when parameter is null. + + + + Adds a text block with options usage informations. + + The instance that collected command line arguments parsed with the class. + The word to use when the option is required. + Thrown when parameter is null. + Thrown when parameter is null or empty string. + + + + Adds a text block with options usage informations. + + The instance that collected command line arguments parsed with the class. + The word to use when the option is required. + The maximum length of the help documentation. + Thrown when parameter is null. + Thrown when parameter is null or empty string. + + + + Builds a string that contains a parsing error message. + + + An options target instance that collected command line arguments parsed with the class. + + + The that contains the parsing error message. + + + + + Returns the help informations as a . + + The that contains the help informations. + + + + Converts the help informations to a . + + This instance. + The that contains the help informations. + + + Index: DamTools/LayerOnSlopeTool/trunk/lib/CommandLineParser/CommandLine.dll =================================================================== diff -u Binary files differ