public void Unsubscribe() { try { this.logger.Info("Client unsubscribed."); this.callBack = null; } catch (Exception exception) { this.logger.Error(exception); } }
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); } }