public bool Unsubscribe() { try { ISlaveCommunicationCallbacks callback = OperationContext.Current.GetCallbackChannel <ISlaveCommunicationCallbacks>(); if (subscribers.Contains(callback)) { subscribers.Remove(callback); } return(true); } catch { return(false); } }
public StatusCommons Subscribe() { try { ISlaveCommunicationCallbacks callback = OperationContext.Current.GetCallbackChannel <ISlaveCommunicationCallbacks>(); if (!subscribers.Contains(callback)) { subscribers.Add(callback); } return(ConfigManager.Instance.GetStatusForClientConsole()); } catch { return(null); } }