Skip to content

NConsoler produces error when not correctly mapping command-line arguments to registered parameters? #7

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Set up action method to take one required string parameter ("StringParam"), 
one required int parameter ("IntParam"), 
and one optional bool parameter ("BoolParam")

2. Compile the program.

3. Run the program with no command-line parameters. NConsoler will produce
the following message:

 "usage: program StringParam IntParam [/BoolParam]\r\n" + 
            "    StringParam    <explanation>\r\n" + 
            "    IntParam      <explanation>\r\n" + 
            "    [/BoolParam]  <explanation>\r\n";


4. Call the program with just the first (string) and third (bool)
parameters:  program.exe StringParam /BoolParam

NConsoler will return an error:  Could not convert "/BoolParam" to integer


What is the expected output? What do you see instead?

I would expect NConsoler to map "/BoolParam" to the "BoolParam" parameter,
recognize that IntParam was not specified, and produce the "Not all
required parameters are set" message.  Instead, I see that NConsoler is
mapping the third, optional parameter (BoolParam) to the second required
parameter (IntParam), and producing an error while trying to convert it to int.


What version of the product are you using? On what operating system?

1.0 on XP Pro SP3.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Oct 2009 at 2:46

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions