public bool ParseCommandLine(string[] args)
{
try
{
// Parse the command-line arguments (thanks NDesk!)
List<string> extra = options_.Parse(args);
// If there are some arguments not parsed, no name of pipe or an invalid port number, show the help
if(extra.Count > 0)
{
Console.WriteLine("Unknow parameter: {0}", extra[0]);
Console.WriteLine();
ShowUsage();
return false; // Do not continue the application
}
}
catch(OptionException e)
{
// Something wrong with the arguments
Console.WriteLine(e.Message);
Console.WriteLine("Try 'ADVpki --help' for more information.");
return false;
}
// Show the help?
if(Help)
{
ShowUsage();
return false;
}
// Continue the application
return true;
}