public static void Disconnect() { try { MainProxy.Close(); MainProxy = null; } catch { } }
public static bool TestTCPNET() { try { EndpointAddress address = new EndpointAddress("net.tcp://localhost/TCPNET"); NetTcpBinding binding = new NetTcpBinding(); MainProxy = new XService.BServiceClient(binding, address); return true; } catch { return false; } }
public static bool TestBSHTTP(string BaseAddress) { try { EndpointAddress address = new EndpointAddress(BaseAddress + "/BSHTTP"); BasicHttpBinding binding = new BasicHttpBinding(); MainProxy = new XService.BServiceClient(binding, address); return true; } catch { return false; } }