public static void Run(string[] args) { var parserResult = Parser.Default.ParseArguments <ClientOption>(args) .WithNotParsed(errors => { Console.WriteLine(errors); System.Environment.Exit(1); }) .WithParsed(options => { var interopClient = new InteropClient(options); Console.WriteLine("Start to Run!"); TOTAL_ERROR = 0; var swTotal = new Stopwatch(); swTotal.Start(); interopClient.Run(); swTotal.Stop(); Console.WriteLine("---------------------Summary:--------------------------"); Console.WriteLine("Error times: {0}", TOTAL_ERROR); Console.WriteLine("Elapsed time: {0}ms", swTotal.ElapsedMilliseconds); Console.ReadKey(); }); }
static void Main(string[] args) { InteropClient.Run(args); }