public static void Run(Options options) { var importer = new EventInfoImporter(options); importer.ImportAsync().GetAwaiter().GetResult(); try { } catch (Exception e) { Console.WriteLine("Importer failed: {0}", e.Message); Console.WriteLine(e); } }
static void Main(string[] args) { Console.WriteLine("yo"); var result = Parser.Default.ParseArguments <Options>(args) .WithParsed(options => EventInfoImporter.Run(options)) .WithNotParsed(errors => HandleErrors(errors)); //.MapResult( //(ListOptions opts) => Utilities.Source.List(opts), //(InfoOptions opts) => Utilities.Source.Info(opts), //errs => 1 // ); // Console.ReadLine(); return; }