//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
// PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
using System;
using Ilog.Language.Tools;
/**
* This class is a test for the Ilog.Language.Tools.Command class. It defines
* the following options:
*
* - ! clobber existing files
*
- d target directory for HTML file(s)
*
- c configuration file
*
- o HTML output file
*
- p package or directory (if more than one file)
*
- s file separator character
*
*
* @version Last modified on Sun May 15 21:08:01 2005 by hak
* @author Hassan Aït-Kaci
* @copyright © 2000 ILOG, S.A.
*/
public class CommandTest : Command
{
private static void HelpAndExit ()
{
PrintHelp();
Environment.Exit(1);
}
private static void ShowOption (String option)
{
Console.Write(option+"\t"+GetOption(option)+"\n");
}
public static void Main (String[] args)
{
try
{
DefineOption("c",
"Hilite.Configuration",
"configuration file");
DefineOption("d",
".",
"target directory");
DefineOption("o",
"output.html",
"HTML output file");
DefineOption("!",
"",
"overwrite existing files");
DefineOption("s",
"/",
"file separator character");
DefineOption("p",
".",
"package or directory");
SetUsage("\nUsage: CommandTest [options] files\n");
if (ParseCommandLine(args))
{
ShowOption("c");
ShowOption("d");
ShowOption("o");
ShowOption("!");
ShowOption("s");
ShowOption("p");
Console.WriteLine();
Console.Write("The arguments are: ");
foreach (String arg in GetArguments())
Console.Write(arg+" ");
Console.WriteLine();
}
}
catch (CommandLineException e)
{
Console.WriteLine(e.Message);
}
}
}