private static void TransferKeywords(IKeywordSource source, IKeywordRepository destination) { try { Exceptionless.ExceptionlessClient.Current.Startup(); if (!CheckEnvironmentPrecondition()) { return; } Console.WriteLine("Keyword importing started ..."); var keywords = source.ReadKeywords(); Console.WriteLine("Keywords cleaned and ready to import: " + keywords.Count.ToString()); if (keywords.Count > 0) { destination.SaveKeywords(keywords); } Console.WriteLine("Keywords imported."); } catch (Exception ex) { ex.ToExceptionless().Submit(); Console.WriteLine(ex.Message); throw; } }
private static void TransferKeywords(IKeywordSource source, IKeywordRepository destination) { try { Exceptionless.ExceptionlessClient.Current.Startup(); Console.WriteLine("Keyword importing started ..."); var keywords = source.ReadKeywords(); Console.WriteLine("Keywords cleaned and ready to import: " + keywords.Count.ToString()); destination.SaveKeywords(keywords); Console.WriteLine("Keywords imported. Press Enter to finish."); Console.ReadLine(); } catch (Exception ex) { ex.ToExceptionless().Submit(); Console.WriteLine(ex.Message); Console.WriteLine("Press Enter to finish."); Console.ReadLine(); } }