예제 #1
0
 public void StopListeningForEventOfInterest(EventOfInterestRegistration registration)
 {
     if (_registrations.ContainsKey(registration.EventKey))
     {
         _registrations[registration.EventKey].Remove(registration);
     }
 }
예제 #2
0
        public void ListenForEventOfInterest(EventOfInterestRegistration registration)
        {
            if (!_registrations.ContainsKey(registration.EventKey))
            {
                _registrations.Add(registration.EventKey, new List <EventOfInterestRegistration>());
            }

            _registrations[registration.EventKey].Add(registration);
        }