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