public void UnsubscribeEvents() { if (this.mRemoteObject != null) { this.mRemoteObject.Warning -= OnWarning; this.mRemoteObject.Terminated -= OnTerminated; } }
public void GetRemoteObject() { this.mRemoteObject = (IProgramMonitorRemoting)Activator.GetObject(typeof(IProgramMonitorRemoting), "ipc://ProgramMonitor.RemotingServer/ProgramMonitorRemoting"); this.mRemoteObject.Warning += OnWarning; this.mRemoteObject.Terminated += OnTerminated; }