コード例 #1
0
ファイル: SearchHost.cs プロジェクト: zhenxing86/HeartBeat
        static void AddSearch()
        {
            startTime = DateTime.Now;

            Console.WriteLine("Search服务发送中.....\n\n*************************************************\n");

            try
            {
                var heartClient = new AddressClient(new InstanceContext(new SearchHost()));
                //var heartClient = new AddressClient(new InstanceContext(new MyAddressCallback()));
                string search = ConfigurationManager.AppSettings["search"];

                heartClient.AddSearch(search);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Search服务发送失败:" + ex.Message);
            }
        }
コード例 #2
0
ファイル: SearchHost.cs プロジェクト: refinedKing/HeartBeat
        static void AddSearch()
        {
            startTime = DateTime.Now;

            Console.WriteLine("Search服务发送中.....\n\n*************************************************\n");

            try
            {
                var heartClient = new AddressClient(new InstanceContext(new SearchHost()));

                string search = ConfigurationManager.AppSettings["search"];

                heartClient.AddSearch(search);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Search服务发送失败:" + ex.Message);
            }
        }