EventAggregator vs CompositeCommand

前端 未结 2 864
慢半拍i
慢半拍i 2021-02-05 13:41

I worked my way through the Prism guidance and think I got a grasp of most of their communication vehicles.

Commanding is very straightforward, so it is clear that the

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 14:16

    Additionally, there is one more important difference: With the current implementation, an event from the EventAggregator is asynchronous, while the CompositeCommand is synchronous.

    If you want to implement something like "notify that event X happened; do something that relies on the event handlers for event X to have executed", you either have to do something like Application.DoEvents() or use CompositeCommands.

提交回复
热议问题