有没有办法做到这一点:
protected void SubscribeToEvent<TEvent, TPayload>(Action<TPayload> a_action)
where TEvent : CompositePresentationEvent<TPayload>
{
TEvent newEvent = _eventAggregator.GetEvent<TEvent>();
SubscriptionToken eventToken = newEvent.Subscribe(a_action);
_lstEventSubscriptions.Add(new KeyValuePair<EventBase, SubscriptionToken>(newEvent, eventToken));
}
不需要用户指定TPayload
参数?