static void Main(string[] args) { // Parse Command Line options CommandLineOptions brArgs = new CommandLineOptions(); ICommandLineParser parser = new CommandLineParser(new CommandLineParserSettings(false, Console.Error)); if (!parser.ParseArguments(args, brArgs, Console.Out)) { Environment.Exit(1); } if (!File.Exists(brArgs.Input)) { Console.WriteLine("Input file does not exist: " + brArgs.Input); return; } StreamReader input = File.OpenText(brArgs.Input); string buildOutput = input.ReadToEnd(); input.Close(); IAnalyseInput analyser = brArgs.VS2010 ? (IAnalyseInput) new AnalyseVSInput() : new AnalyseMsbuildInput(); analyser.Parse(buildOutput); Solution solution = analyser.Solution; if (!string.IsNullOrEmpty(brArgs.Solution)) { solution.Name = brArgs.Solution; } string reportTitle; if (string.IsNullOrEmpty(brArgs.Title)) { reportTitle = "Build Results"; } else { reportTitle = brArgs.Title; } WriteReport report = new WriteReport(brArgs.Output, reportTitle); report.WriteSolution(solution); report.WriteBuildReport(buildOutput); }
static void Main(string[] args) { // Parse Command Line options CommandLineOptions brArgs = new CommandLineOptions(); ICommandLineParser parser = new CommandLineParser(new CommandLineParserSettings(false, Console.Error)); if (!parser.ParseArguments(args, brArgs, Console.Out)) Environment.Exit(1); if (!File.Exists(brArgs.Input)) { Console.WriteLine("Input file does not exist: " + brArgs.Input); return; } StreamReader input = File.OpenText(brArgs.Input); string buildOutput = input.ReadToEnd(); input.Close(); IAnalyseInput analyser = brArgs.VS2010 ? (IAnalyseInput) new AnalyseVSInput() : new AnalyseMsbuildInput(); analyser.Parse(buildOutput); Solution solution = analyser.Solution; if (!string.IsNullOrEmpty(brArgs.Solution)) solution.Name = brArgs.Solution; string reportTitle; if (string.IsNullOrEmpty(brArgs.Title)) reportTitle = "Build Results"; else reportTitle = brArgs.Title; WriteReport report = new WriteReport(brArgs.Output, reportTitle); report.WriteSolution(solution); report.WriteBuildReport(buildOutput); }