How to create an EventAggregator prism?

The structure of pub-sub events is that the publisher does not need to know or care if all the subscribers are there, and do not care about the subscribers if they are (from Brian Neuss "blog )

What are the best practices for using EventAggregator in Prism? Currently, I have few modules that are loosely coupled and work independently. These modules use EventAggregator to communicate with other modules. As the application grows, I am confused about how to document my code. There may be many modules publishing Events, and many others subscribe to it, as Brian does not believe that none of them knows what the other is doing. When creating a new module, how can I make sure that they are subscribed to some XYZ event without breaking a loosely coupled structure?

How can I visualize a module using EventAggregator visually (some diagrams)?

+3
source share
1 answer

, " ", .

, EventAggregator, - . EventAggregator , , . :

, - .

EventAggregator , . , -. , ( ). , , , "UserDataChanged", , , .

.NET Event EventAggregator,

, , - -, EventAggregator, , , EventAggregator. , , , .

, , - - . - "TreeItemChecked" "ListViewItemSelected". , .NET- , , (EventAggregator), () .


EventAggregator, : EventAggregator , ( ..). , . Observers, EventAggregator , .

, - : , . , EventAggregator. , , .

, , . , ( , ), .

+19

Source: https://habr.com/ru/post/1722398/


All Articles