public void Unsubscribe <T>(ISubscriberToMidiEvent <T> subscriber) where T : MidiEvent { var subscription = subscribers.SingleOrDefault(s => s.subscriber == subscriber); subscribers.Remove(subscription); }
public Subscriber(ISubscriberToMidiEvent subscriber) { this.subscriber = subscriber; }
public void Subscribe <T>(ISubscriberToMidiEvent <T> subscriber) where T : MidiEvent { subscribers.Add(new Subscriber <T>(subscriber)); }