public void ObserveRemotes(IRemoteObserver observer) { remoteObservers.Add(observer); foreach (var remote in remotes) { observer.NotifyRemoteExists(remote); } }
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); } } }