Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prism EventAggregator difference between PubSubEvent<TPayload> Class and CompositePresentationEvent<TPayload> Class

Im trying to get my EventAggregator in Prism working based on this example MSDN.

After having some problems that where caused by mixing up class references i would like to know the difference of:

PubSubEvent Class MSDN

and

CompositePresentationEvent Class MSDN

I couldnt find a more detailed information. And both references say Defines a class that manages publication and subscription to events.

So far so good. But when to use them or which of them? What is the difference?

Maybe somebody can help me on this.

like image 304
ck84vi Avatar asked Nov 19 '14 07:11

ck84vi


1 Answers

PubSubEvent is a newer class replacing CompositePresentationEvent which was deprecated.

The classes in the Events namespace were made obsolete but still exist in Prism 5.0. You should use the classes from the Prism.PubSubEvents portable class library with the Prism.PubSubEvents namespace. The PubSubEvent class replaces the CompositePresentationEvent class.

Source: http://msdn.microsoft.com/en-us/library/ff921144(v=pandp.40).aspx

like image 100
Moti Azu Avatar answered Oct 21 '22 07:10

Moti Azu