Ejemplo n.º 1
0
        /// <summary>
        /// <see cref="IMonitorAndControl"/>
        /// </summary>
        public void Disconnect()
        {
            _log.Trace(m => m("M&C; Disconnect."));

            this._subscriber = null;
            Cleanup();
        }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
 /// <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;
 }