我有一个 CustomerListViewModel 和一个 OrderListViewModel。在后者中,我选择一个订单来删除它,或者我创建一个新订单。在这两种情况下,我的 CustomerListViewModel 和 Messenger 都必须注册到 IOrder 类型:
Messenger.Default.Register<IOrder>(this, AddOrder);
Messenger.Default.Register<IOrder>(this, DeleteOrder);
In the OrderListViewModel I do send the customer to be deleted/added:
Messenger.Default.Send<IOrder>(MyOrderObject);
Now both Actions AddOrder and DeleteOrder gets surely executed, how can I differentiate ?