public void UpdateTarget(object monitor, object comp) { if (this.HubServer != null) { this.HubServer.UnSubscribeToAlertActionFroNewMessage(new Action <string, string>(this.ProcessNewLog)); } this.HubServer = (IMonitorableDaemon)monitor; this.HubServerComp = (Computer)comp; this.HubServer.SubscribeToAlertActionFroNewMessage(new Action <string, string>(this.ProcessNewLog)); }
public void Init(object OSobj) { this.os = (OS)OSobj; this.HubServerComp = Programs.getComputer(this.os, this.syncServerName); if (this.HubServerComp == null && Settings.IsInExtensionMode) { return; } this.HubServer = (IMonitorableDaemon)(this.HubServerComp.getDaemon(typeof(DLCHubServer)) as DLCHubServer); if (this.HubServer == null) { throw new NullReferenceException("DLCHubServer not found on AlertsIcon sync destination computer"); } this.HubServer.SubscribeToAlertActionFroNewMessage(new Action <string, string>(this.ProcessNewLog)); }