private static string StartServer(Type typeOfService) { string address = _base + typeOfService.Name; var srv = new CallbackService(new CallbackData { Data = "Hello from Server" }); var server = new ServiceHost(srv, new Uri(address)); server.AddServiceEndpoint(typeOfService, _binding, address); server.Open(); ConsoleEx.SrvWriteLine("Server started :" + address); return(address); }
private static string StartServer(Type typeOfService) { string address = _base + typeOfService.Name; var srv = new CallbackService(new CallbackData {Data = "Hello from Server"}); var server = new ServiceHost(srv, new Uri(address)); server.AddServiceEndpoint(typeOfService, _binding, address); server.Open(); ConsoleEx.SrvWriteLine("Server started :" + address); return address; }