예제 #1
0
        static void Main(string[] args)
        {
            SemantAPIRobot form = null;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length > 0)
            {
                if (args.Contains("-debug"))
                {
                    AllocConsole();
                    Console.WriteLine("Greetings from SemantAPI.Robot application!");
                    Console.WriteLine("SemantAPI.Robot supports benchmark mode for all integrated servises.");
                    Console.WriteLine("The command line arguments are following:");
                    Console.WriteLine("\t-benchmark_Semantria\r\n\t-benchmark_Alchemy\r\n\t-benchmark_Repustate\r\n\t-benchmark_Chatterbox\r\n\t-benchmark_Viralheat\r\n\t-benchmark_Bitext\r\n\t-benchmark_Skyttle\r\n");

                    form = new SemantAPIRobot(true);
                    List <string> services = new List <string>();

                    if (args.Any(item => item.IndexOf("-benchmark") > -1))
                    {
                        IEnumerable <string> list = args.Where(item => item.Contains("-benchmark"));
                        foreach (string service in list)
                        {
                            string name = service.Substring(service.IndexOf('_') + 1);
                            services.Add(name);
                        }
                    }

                    form.Benchmark = services;
                }
            }
            else
            {
                form = new SemantAPIRobot(false);
            }

            ThreadPool.SetMinThreads(7, 7);
            Application.Run(form);
        }
예제 #2
0
파일: Program.cs 프로젝트: RavenB/SemantAPI
        static void Main(string[] args)
        {
            SemantAPIRobot form = null;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length > 0)
            {
                if (args.Contains("-debug"))
                {
                    AllocConsole();
                    Console.WriteLine("Greetings from SemantAPI.Robot application!");
                    Console.WriteLine("SemantAPI.Robot supports benchmark mode for all integrated servises.");
                    Console.WriteLine("The command line arguments are following:");
                    Console.WriteLine("\t-benchmark_Semantria\r\n\t-benchmark_Alchemy\r\n\t-benchmark_Repustate\r\n\t-benchmark_Chatterbox\r\n\t-benchmark_Viralheat\r\n\t-benchmark_Bitext\r\n\t-benchmark_Skyttle\r\n");

                    form = new SemantAPIRobot(true);
                    List<string> services = new List<string>();

                    if (args.Any(item => item.IndexOf("-benchmark") > -1))
                    {
                        IEnumerable<string> list = args.Where(item => item.Contains("-benchmark"));
                        foreach (string service in list)
                        {
                            string name = service.Substring(service.IndexOf('_') + 1);
                            services.Add(name);
                        }
                    }

                    form.Benchmark = services;
                }
            }
            else
                form = new SemantAPIRobot(false);

            ThreadPool.SetMinThreads(7, 7);
            Application.Run(form);
        }