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); } }
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); } }