public static void ObserverAndObservableTest() { var source = new SimpleColdSource(); var observer1 = new MyObserver("Marcin"); var observer2 = new MyObserver("Bartek"); using (var subscibtion = source.Subscribe(observer1)) { } source.Subscribe(observer2); //subscibtion.Dispose(); }
public static void Execute() { var source = new SimpleColdSource(); var observer = new TestObserver("Test"); using (source.Subscribe(observer)) { } }