Example #1
0
 public void Unsubscribe()
 {
     try
     {
         this.logger.Info("Client unsubscribed.");
         this.callBack = null;
     }
     catch (Exception exception)
     {
         this.logger.Error(exception);
     }
 }
Example #2
0
        public void Subscribe()
        {
            try
            {
                OperationContext ctx = OperationContext.Current;
                this.callBack = ctx.GetCallbackChannel <IMessageBrokerProxyServiceCallback>();

                this.keepAliveWorker = Task.Run(() => this.KeepAliveWorkerLoop());

                this.logger.Info("Client subscribed.");
            }
            catch (Exception exception)
            {
                this.logger.Error(exception);
            }
        }