将 Prism 4 迁移到 Prism 6 - CompositePresentationEvent

Migrate Prism 4 to Prism 6 - CompositePresentationEvent

我想将使用 Prism 4 编写的项目迁移到 Prism 6。

在 Prism 4 中,CompositePresentationEvent<T> 类型位于 Microsoft.Practices.Composite.Presentation.Events 命名空间下。

但是当我从 nugget 中提取 Prism 6 并删除旧的 Prism 4 引用时,我在 Prism 6 命名空间的任何地方都看不到这个事件类型。

谁能帮我一下?

CompositePresentationEvent 已在 Prism 6 中删除。如果我没记错的话,它在 Prism 5 中已弃用,并在 Prism 6 中完全删除。

现在,您需要使用 Prism.Events 命名空间中的 PubSubEvent<TPayload>

R. Richards 写的是正确的,因此被正确标记为答案。 不过,我可以向您提供以下 link 作为参考:

Upgrading from Prism Library 4.1

正如标题所示,它指的是从 4.​​1 版升级到 5.0 版,但除了此处提到的更改之外,还有其他更改,这些更改可能对您有所帮助。