/// <summary> /// <see cref="IMonitorAndControl"/> /// </summary> public void Disconnect() { _log.Trace(m => m("M&C; Disconnect.")); this._subscriber = null; Cleanup(); }
/// <summary> /// <see cref="IMonitorAndControl"/> /// </summary> public void Connect() { _log.Trace(m => m("M&C; Connect.")); IMonitorAndControlNotification callback = OperationContext.Current.GetCallbackChannel <IMonitorAndControlNotification>(); this._subscriber = callback; ServiceHostMc host = OperationContext.Current.Host as ServiceHostMc; Debug.Assert(host != null); _zoneServer = host.ZoneServer; }
/// <summary> /// Constructor /// </summary> /// <param name="callback">Callback to notify the client.</param> /// <param name="zoneServer">The zone server.</param> public MonitorAndControlService(IMonitorAndControlNotification callback, IZoneServer zoneServer) { this._subscriber = callback; this._zoneServer = zoneServer; }