private static void ExecuteDirect(string[] args)
        {
            var task   = args[1].ToLowerInvariant();
            var action = Configuration.GetConsoleAction(task);

            if (action == null)
            {
                return;
            }

            var corpus    = args[0] == "NULL" ? CorpusNullHelper.Corpus : CorpusLoadHelper.LoadCorpus(args[0]);
            var selection = corpus?.ToSelection();

            if (selection == null)
            {
                return;
            }

            var temp = args.ToList();

            temp.RemoveAt(0); // CorpusFile (no longer needed)
            temp.RemoveAt(0); // Action (no longer needed)
            action.Execute(selection, temp.ToArray(), _writer);
        }
예제 #2
0
 public WebService(AbstractTableWriter writer, string ip, int port, string file, int timeout = 0) : base(writer, ip, port, timeout)
 {
     System.Console.Write(Resources.WebInit, file);
     _corpus = CorpusLoadHelper.LoadCorpus(file);
     System.Console.WriteLine(Resources.Ok);
 }