/// <summary> /// Unsubscribes the given object from changes in the scan results data type. /// </summary> /// <param name="snapshotObserver">The object to observe scan results data type changes.</param> public void Unsubscribe(IResultDataTypeObserver snapshotObserver) { lock (this.ObserverLock) { if (this.ScanResultsObservers.Contains(snapshotObserver)) { this.ScanResultsObservers.Remove(snapshotObserver); } } }
/// <summary> /// Subscribes the given object to changes in the scan results data type. /// </summary> /// <param name="snapshotObserver">The object to observe scan results data type changes.</param> public void Subscribe(IResultDataTypeObserver snapshotObserver) { lock (this.ObserverLock) { if (!this.ScanResultsObservers.Contains(snapshotObserver)) { this.ScanResultsObservers.Add(snapshotObserver); snapshotObserver.Update(this.ActiveType); } } }