AbParse.AbParseCommandLineParser.Parse C# (CSharp) Method

Parse() public method

public Parse ( ) : void
return void
        public override void Parse()
        {
            InputFilePath = ParseStringParameterSwitch("-i");
            OutputFile = ParseStringParameterSwitch("-o","AbParseResults.html");
            OutputMode = ParseStringParameterSwitch("-m","html");
            this.IsHelp = ParseParameterSwitch("-h");
        }

Usage Example

        static void Main(string[] args)
        {
            var cl = new AbParseCommandLineParser();

            cl.Parse();

            Console.WriteLine("*** Apache Bench Output Parser\r\n\n");


            if (cl.IsHelp)
            {
                string syntax = @"
Usage:

AbParse -i""InputFilePathOrWildCard"" -o""OutputFile"" -m""OutputMode""

    -i - Input file or WildCard to match output generated from ab.exe
    -o - Filename for the output generated
    -m - Output Mode: html,csv, xml
";
                Console.WriteLine(syntax);
                return;
            }

            if (string.IsNullOrEmpty(cl.InputFilePath))
            {
                Console.WriteLine("Input filename is required. Please use the -i switch to specify a file or wildcard path");
                return;
            }

            ParseFiles(cl);
        }
All Usage Examples Of AbParse.AbParseCommandLineParser::Parse
AbParseCommandLineParser