コード例 #1
0
 /// <summary>
 /// Unsubscribes the given object from changes in the active snapshot.
 /// </summary>
 /// <param name="snapshotObserver">The object to observe active snapshot changes.</param>
 public void Unsubscribe(ISnapshotObserver snapshotObserver)
 {
     lock (this.ObserverLock)
     {
         if (this.SnapshotObservers.Contains(snapshotObserver))
         {
             this.SnapshotObservers.Remove(snapshotObserver);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Unsubscribes the given object from changes in the active snapshot.
 /// </summary>
 /// <param name="snapshotObserver">The object to observe active snapshot changes.</param>
 public static void Unsubscribe(ISnapshotObserver snapshotObserver)
 {
     lock (SnapshotManager.ObserverLock)
     {
         if (SnapshotManager.SnapshotObservers.Contains(snapshotObserver))
         {
             SnapshotManager.SnapshotObservers.Remove(snapshotObserver);
         }
     }
 }
コード例 #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 void Subscribe(ISnapshotObserver snapshotObserver)
 {
     lock (this.ObserverLock)
     {
         if (!this.SnapshotObservers.Contains(snapshotObserver))
         {
             this.SnapshotObservers.Add(snapshotObserver);
             snapshotObserver.Update(this.GetActiveSnapshot(createIfNone: false));
         }
     }
 }
コード例 #4
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.GetSnapshot(SnapshotRetrievalMode.FromActiveSnapshot));
         }
     }
 }
コード例 #5
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));
         }
     }
 }