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();
            }
        }
Esempio n. 3
0
 public KeywordParser(IKeywordSource keywordSource)
 {
     this.keywordSource = keywordSource;
 }
Esempio n. 4
0
 internal Chat(UltimaServer ultimaServer, Action notifyAction, IConsole console, IKeywordSource keywordSource)
 {
     this.ultimaServer = ultimaServer;
     this.notifyAction = notifyAction;
     this.console      = console;
     keywordParser     = new KeywordParser(keywordSource);
 }