public static ExCommsServerCallbackProxy Get(IExecutorService executorService, ExCommsServerCallbackTypes callbackType, IExCommsServerCallback callbackInstance, int timeoutInMilliseconds, WaitHandle canListen) { using (ILogMethod method = Log.LogMethod("ExCommsServerProxyFactory", "Get")) { ExCommsServerCallbackProxy result = default(ExCommsServerCallbackProxy); try { result = new ExCommsServerCallbackProxy(executorService, callbackType, callbackInstance, timeoutInMilliseconds, canListen); } 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); } }