Hi,
As far as I know, when publishing an event you can only pass one parameter of the same type as the event's payload. For example, if you define a MyEvent doing something like this:
However, this gives you a lot of flexibility as the MyParameterClass could be as simple or as complex as you want. Taking this into account, a possible approach to pass several parameters could be encapsulate those parameters in a single one used to contain them:
Damian Cherubini
http://blogs.southworks.net/dcherubini
As far as I know, when publishing an event you can only pass one parameter of the same type as the event's payload. For example, if you define a MyEvent doing something like this:
public class MyEvent : CompositePresentationEvent< MyParameterClass >
It means you can pass an object of type MyParameterClass when publishing the event.However, this gives you a lot of flexibility as the MyParameterClass could be as simple or as complex as you want. Taking this into account, a possible approach to pass several parameters could be encapsulate those parameters in a single one used to contain them:
parameters.Parameter1 = parameter1;
parameters.Parameter2 = parameter2;
eventAggregator.GetEvent<MyEvent>().Publish(parameters);
Regards,Damian Cherubini
http://blogs.southworks.net/dcherubini