static void Main(string[] args) { // Parse Command Line. var options = new CommandLine(); if(!options.Parse(args)) return; // Parse link file. var links = new LinkFile(); if(!links.Load(options.LinkFile)) return; MainLoop(options, links); }
/// <summary> /// Run all the tests and then sleep for a while. /// </summary> private static void MainLoop(CommandLine options, LinkFile links) { using (var outputFile = new OutputFile(links)) { if(!outputFile.Open(options.OutputFile)) return; for(int i = 0; i < options.SampleCount; i++) { var result = RunTests(links, options); outputFile.OutputResult(result); CountDown.Wait(options.SampleSleep); } } }