private static void ParseArgs() { string[] commandLineArgs = Environment.GetCommandLineArgs(); for (int i = 1; i < commandLineArgs.Length; i++) { HtmlCmdLine.GetBoolArg(commandLineArgs[i], "?", ref HtmlCmdLine.Help); HtmlCmdLine.GetBoolArg(commandLineArgs[i], "h", ref HtmlCmdLine.Help); HtmlCmdLine.GetBoolArg(commandLineArgs[i], "help", ref HtmlCmdLine.Help); } }
internal static int GetOption(string name, int def) { int result = def; string[] commandLineArgs = Environment.GetCommandLineArgs(); for (int i = 1; i < commandLineArgs.Length; i++) { HtmlCmdLine.GetIntArg(commandLineArgs[i], name, ref result); } return(result); }
internal static string GetOption(int index, string def) { string result = def; string[] commandLineArgs = Environment.GetCommandLineArgs(); int num = 0; for (int i = 1; i < commandLineArgs.Length; i++) { if (HtmlCmdLine.GetStringArg(commandLineArgs[i], ref result)) { if (index == num) { return(result); } result = def; num++; } } return(result); }
static HtmlCmdLine() { HtmlCmdLine.Help = false; HtmlCmdLine.ParseArgs(); }