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); } }
internal static ExCommsServerProxy Get(IExCommsServerCallback callbackInstance) { using (ILogMethod method = Log.LogMethod("ExCommsServerProxyFactory", "Get")) { ExCommsServerProxy result = default(ExCommsServerProxy); try { result = ExCommsGenericProxy.GetService <ExCommsServerProxy, IExCommsServer>( (i) => { if (callbackInstance != null) { return(new ExCommsServerProxy(i, callbackInstance)); } else { return(new ExCommsServerProxy(i)); } }, (b, u) => { if (callbackInstance != null) { return(new ExCommsServerProxy(callbackInstance, b, u, null)); } else { return(new ExCommsServerProxy(b, u)); } }); } catch (Exception ex) { method.Exception(ex); } return(result); } }