/// <summary>
 /// Subscribes the given object to changes in the active snapshot.
 /// </summary>
 /// <param name="snapshotObserver">The object to observe active snapshot changes.</param>
 public void Subscribe(ISnapshotObserver snapshotObserver)
 {
     lock (this.ObserverLock)
     {
         if (!this.SnapshotObservers.Contains(snapshotObserver))
         {
             this.SnapshotObservers.Add(snapshotObserver);
             snapshotObserver.Update(this.GetSnapshot(SnapshotRetrievalMode.FromActiveSnapshot));
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Subscribes the given object to changes in the active snapshot.
 /// </summary>
 /// <param name="snapshotObserver">The object to observe active snapshot changes.</param>
 public void Subscribe(ISnapshotObserver snapshotObserver)
 {
     lock (this.ObserverLock)
     {
         if (!this.SnapshotObservers.Contains(snapshotObserver))
         {
             this.SnapshotObservers.Add(snapshotObserver);
             snapshotObserver.Update(this.GetActiveSnapshot(createIfNone: false));
         }
     }
 }
Exemple #3
0
 /// <summary>
 /// Subscribes the given object to changes in the active snapshot.
 /// </summary>
 /// <param name="snapshotObserver">The object to observe active snapshot changes.</param>
 public static void Subscribe(ISnapshotObserver snapshotObserver)
 {
     lock (SnapshotManager.ObserverLock)
     {
         if (!SnapshotManager.SnapshotObservers.Contains(snapshotObserver))
         {
             SnapshotManager.SnapshotObservers.Add(snapshotObserver);
             snapshotObserver.Update(SnapshotManager.GetSnapshot(Snapshot.SnapshotRetrievalMode.FromActiveSnapshot, null));
         }
     }
 }