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); } }
protected override void UnsubscribeInternal(WcfClientChannel <IExMonServer4MonClient> client) { ExMonServer4MonClientProxy proxy = client as ExMonServer4MonClientProxy; proxy.Unsubscribe(_callbackType, FillSubscriptionEntity(_unsubscribeEntity)); }