Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate Prism 4 to Prism 6 - CompositePresentationEvent

Tags:

prism-6

I want to migrate a project written with Prism 4 into Prism 6.

In Prism 4 the CompositePresentationEvent<T> type is under Microsoft.Practices.Composite.Presentation.Events namespace.

But when I pulled Prism 6 from nugget and removed old Prism 4 references, I could not see this event type anywhere in Prism 6 namespaces.

Anyone can help me a bit?

like image 337
hardywang Avatar asked Jan 08 '16 02:01

hardywang


People also ask

What happened to compositepresentationevent in prism 6?

The CompositePresentationEvent has been removed in Prism 6. If I recall correctly, if was deprecated in Prism 5, and removed completely in Prism 6. Now, you need to use the PubSubEvent<TPayload> in the Prism.Events namespace.

How to migrate from common service locator to Prism core?

The recommended migration is to use Prism.Plugin.Logging or whatever 3rd party logging framework you prefer. Information on getting started with Prism.Plugin.Logging can be found here. New ContainerLocator has been added to Prism.Core and it replaces Common Service Locator in Prism.Wpf.

What is the best way to migrate to Prism?

The recommended migration is to use Prism.Plugin.Logging or whatever 3rd party logging framework you prefer. Information on getting started with Prism.Plugin.Logging can be found here.

How do I raise a CPE in a prism event?

A Prism component raises a CPE by publishing it to the Event Aggregator, which notifies all subscribers to the event. Since a CPE is used across the entire application, its class is located in the demo app’s Common project, in the Events folder.


2 Answers

The CompositePresentationEvent has been removed in Prism 6. If I recall correctly, if was deprecated in Prism 5, and removed completely in Prism 6.

Now, you need to use the PubSubEvent<TPayload> in the Prism.Events namespace.

like image 119
R. Richards Avatar answered Oct 19 '22 07:10

R. Richards


What R. Richards wrote is correct and has thus been correctly marked as an answer. Might I however offer you the following link as a reference:

Upgrading from Prism Library 4.1

As the title suggests it refers to upgrading from version 4.1 to 5.0 but there are, apart from the change mentioned here, other changes noted there which you might find helpful.

like image 29
user3235445 Avatar answered Oct 19 '22 09:10

user3235445