快速提问 – 如何在Prism事件聚合器订阅者操作中调用异步方法?例如.
_eventAggregator.GetEvent<PubSubEvent<SomeMessage>>()
.Subscribe((msg) => {
DoSomething();
await DoSomethingAsync();
DoSomethingElse();
});
最佳答案 只需让@Charles Mager得到答案
_eventAggregator.GetEvent<PubSubEvent<SomeMessage>>()
.Subscribe(async(msg) => {
DoSomething();
await DoSomethingAsync();
DoSomethingElse();
});