/// <summary> /// Adds an event handler to the invocation list of the current event as an event handler /// that is dispatched using the specified dispatcher. /// </summary> /// <param name="handler"> /// The event handler to add as an event handler /// that is dispatched using the specified dispatcher. /// </param> /// <param name="dispatcher"> /// Dispatcher to use when dispatching the event handler. /// </param> /// <exception cref="ArgumentNullException"> /// <c>dispatcher</c> is <c>null</c>. /// </exception> public void AddDispatched(T handler, IDispatcher dispatcher) { Contract.Requires(dispatcher != null, "dispatcher"); DispatchedEventHelper.AddDispatched(this, ref m_handlers, handler, dispatcher); }
/// <summary> /// Adds an event handler to the invocation list of the current event as a NOT dispatched event handler. /// </summary> /// <param name="handler"> /// The event handler to add as a NOT dispatched event handler. /// </param> public void Add(T handler) { DispatchedEventHelper.AddDispatched(this, ref m_handlers, handler); }