public static ExMonServer4CommsServerProxy Get(IExMonServer4CommsServerCallback callbackInstance) { using (ILogMethod method = Log.LogMethod("ExMonServer4CommsServerProxyFactory", "Get")) { ExMonServer4CommsServerProxy result = default(ExMonServer4CommsServerProxy); Binding binding = ExCommServerWcfHelper.CreateTcpBinding(); string uri = "net.tcp://lt-in224:8880/BMC/Exchange"; try { result = ExCommsGenericProxy.GetService <ExMonServer4CommsServerProxy, IExMonServer4CommsServer>( (i) => { if (callbackInstance != null) { return(new ExMonServer4CommsServerProxy(i, callbackInstance)); } else { return(new ExMonServer4CommsServerProxy(i)); } }, (b, u) => { b = binding; u = uri; if (callbackInstance != null) { return(new ExMonServer4CommsServerProxy(callbackInstance, b, u, null)); } else { return(new ExMonServer4CommsServerProxy(b, u)); } }); } catch (Exception ex) { method.Exception(ex); } return(result); } }
static ProxyHelper() { _hostIpAddress = Extensions.GetIpAddressString(-1); _binding = ExCommServerWcfHelper.CreateTcpBinding(); _serverUri = "net.tcp://{0}:{1:D}/" + BaseUrl; }