public void Dispose()
 {
     if (_parent != null)
     {
         _parent.RemoveSubscription(this);
         _parent = null;
     }
 }
        public static void SubscribeToKeyWatcher()
        {
            var source = new KeyWatcher();
            var sub    = new MySubscriber <char>();

            source.Subscribe(sub);
            source.Run();
        }
 public Subscription(KeyWatcher parent, IObserver <char> observer)
 {
     _parent  = parent;
     Observer = observer;
 }