public ObserversViaSpecialInterfaces() { var person = new Person2(); //IDisposable sub = person.Subscribe(this); // Reactive Extensions event. person.OfType <FallsIllEvent>().Subscribe(args => Console.WriteLine($"A doctor is required at {args.Address}")); person.FallsIll(); }
public Subscription(Person2 person, IObserver <Event> observer) { _person = person; Observer = observer; }