Пример #1
0
        /// <summary>
        /// Invokes the specified parameter.
        /// </summary>
        /// <param name="parameter">The parameter.</param>
        protected override void Invoke(object parameter)
        {
            var et = EventDataType;

            if (EventData != null)
            {
                if (et == null)
                {
                    et = typeof(object);
                }

                if (!et.GetTypeOrTypeInfo().IsAssignableFrom(EventDataType.GetType()))
                {
                    return;
                }
            }

            var targetEventRouter = EventRouter ?? EventRouter.Instance;

            targetEventRouter.GetEventChannel(et).RaiseEvent(this.AssociatedObject, this.EventRoutingName, EventData, IsEventFiringToAllBaseClassesChannels, IsEventFiringToAllImplementedInterfacesChannels);

            //targetEventRouter.RaiseEvent(this, EventData, EventDataType, EventRoutingName);
        }