public static ExMonServer4MonClientCallbackProxy Get(IExecutorService executorService, ExMonServer4MonClientCallbackTypes callbackType, IExMonServer4MonClientCallback callbackInstance, int timeoutInMilliseconds, WaitHandle canListen) { using (ILogMethod method = Log.LogMethod("ExMonServer4MonClientProxyFactory", "Get")) { ExMonServer4MonClientCallbackProxy result = default(ExMonServer4MonClientCallbackProxy); try { result = new ExMonServer4MonClientCallbackProxy(executorService, callbackType, callbackInstance, timeoutInMilliseconds, canListen); } catch (Exception ex) { method.Exception(ex); } return(result); } }
internal static ExMonServer4MonClientProxy Get(IExMonServer4MonClientCallback callbackInstance) { using (ILogMethod method = Log.LogMethod("ExMonServer4MonClientProxyFactory", "Get")) { ExMonServer4MonClientProxy result = default(ExMonServer4MonClientProxy); try { result = ExCommsGenericProxy.GetService <ExMonServer4MonClientProxy, IExMonServer4MonClient>( (i) => { if (callbackInstance != null) { return(new ExMonServer4MonClientProxy(i, callbackInstance)); } else { return(new ExMonServer4MonClientProxy(i)); } }, (b, u) => { if (callbackInstance != null) { return(new ExMonServer4MonClientProxy(callbackInstance, b, u, ExCommsMessageKnownTypeFactory.KnownTypes)); } else { return(new ExMonServer4MonClientProxy(b, u)); } }); } catch (Exception ex) { method.Exception(ex); } return(result); } }