예제 #1
0
        public static T CreateChannel <T>(string serviceHost, int port)
        {
            ChannelFactory <T> factory = new ChannelFactory <T>(BasicHttpBinding, new EndpointAddress(new Uri(new Uri($"http://{serviceHost}:{port}/"), typeof(T).Name)));

            return(factory.CreateChannel());
        }
 private IControlCenterService CreateService()
 {
     return(ChannelFactory.CreateChannel <IControlCenterService>(MinerServerHost, MinerServerPort));
 }