Exemplo n.º 1
0
 /// <summary>
 /// Unsubscribes the given object from changes in the selected objects.
 /// </summary>
 /// <param name="propertyViewerObserver">The object to observe selected objects changes.</param>
 public void Unsubscribe(IPropertyViewerObserver propertyViewerObserver)
 {
     lock (this.ObserverLock)
     {
         if (this.PropertyViewerObservers.Contains(propertyViewerObserver))
         {
             this.PropertyViewerObservers.Remove(propertyViewerObserver);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Subscribes the given object to changes in the selected objects.
 /// </summary>
 /// <param name="propertyViewerObserver">The object to observe selected objects changes.</param>
 public void Subscribe(IPropertyViewerObserver propertyViewerObserver)
 {
     lock (this.ObserverLock)
     {
         if (!this.PropertyViewerObservers.Contains(propertyViewerObserver))
         {
             this.PropertyViewerObservers.Add(propertyViewerObserver);
             propertyViewerObserver.Update(this.TargetObjects);
         }
     }
 }