/// <summary>Dispatch an event to all interested listeners.</summary> /// <remarks> /// Dispatch an event to all interested listeners. /// <p> /// Listeners are selected by the type of listener the event delivers to. /// </remarks> /// <param name="event">the event to deliver.</param> public virtual void Dispatch(RepositoryEvent @event) { IList <ListenerHandle> list = lists.Get(@event.GetListenerType()); if (list != null) { foreach (ListenerHandle handle in list) { @event.Dispatch(handle.listener); } } }