Hello
I have an event that uses an eventarg class that has a generic parameter. I want to publish this event and have the subscriber act on the generic parameter that was passed.
on the Publish side I have this:
PublishPrismEvent.Publish(new PrismPublishEventArgs<TPayload>(this.MethodName,this.TargetName, argument));
"argument" is defined as a generic parameter in the PrismPublishEventArgs class. On the subscribe side, I wish to subscribe to this event and then analyze that generic parameter using reflection, for example, in the event handler. I have:
PrismPublishEvent PrismInternalPublishEvent = EventAggregator.GetEvent<PrismPublishEvent>(); PrismInternalPublishEvent.Subscribe(PrismInternalPublishEventHandler, ThreadOption.UIThread, false);
but it is throwing an error saying "Incorrect number of type parameters in reference to class PrismPublishEvent<T>"This should be doable... any help would be greatly appreciated.
Thanks
Harold