Ejemplo n.º 1
0
 public void ObserveRemotes(IRemoteObserver observer)
 {
     remoteObservers.Add(observer);
     foreach (var remote in remotes)
     {
         observer.NotifyRemoteExists(remote);
     }
 }
Ejemplo n.º 2
0
 internal static void Bind(this IReadOnlyList<IQStreamable<DiagramModelCollection>> collection, IRemoteObserver<DiagramModelCollection> remoteObserver, int startIndex = 0)
 {
     if (startIndex == collection.Count)
     {
         Console.WriteLine("Application Start.");
         Console.WriteLine("Press a botton to exit.");
         Console.ReadLine();
     }
     else
     {
         var toBind = collection[startIndex];
         startIndex++;
         using (toBind.Bind(remoteObserver).Run())
         {
             collection.Bind(remoteObserver, startIndex);
         }
     }
 }