Skip to content

Commit 5707ad7

Browse files
authored
Update README.md
1 parent 5a65e6c commit 5707ad7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ aggregator.TryRegisterObservable(
379379
new[] {nameof(INotifyPropertyChanged.PropertyChanged)});
380380
```
381381

382-
##### Listen to all aggregated event sources by event name
383-
Subscribe to the `EventAggregator` and listen to specific events of all aggregated event sources:
382+
##### Listen to *all* aggregated event sources *by event name*
383+
Subscribe to the `EventAggregator` and listen to specific events of **all** aggregated event sources:
384384

385385
```C#
386386
// Listen to everything that publishes the 'INotifyPropertyChanged.PropertyChanged' event
@@ -389,8 +389,8 @@ aggregator.TryRegisterObserver<PropertyChangedEventHandler>(
389389
ShowMessage_OnPropertyChanged);
390390
```
391391

392-
##### Listen to specific aggregated event sources by event name
393-
Subscribe to the `EventAggregator` and listen to specific events of specific aggregated event sources:
392+
##### Listen to *specific* aggregated event sources by event name
393+
Subscribe to the `EventAggregator` and listen to specific events of **specific** aggregated event sources (by source type):
394394

395395
```C#
396396
// Only listen to the 'INotifyPropertyChanged.PropertyChanged' event raised by any instance of type 'MainWindowViewModel'
@@ -406,13 +406,17 @@ aggregator.TryRegisterObserver<PropertyChangedEventHandler>(
406406
ShowMessage_OnPropertyChanged);
407407
```
408408
##### Listen to all events that match the signature of the event handler or that use a matching `EventArgs` type
409-
Subscribe to the `EventAggregator` and listen to specific events of specific aggregated event sources:
410409

410+
Subscribe to the `EventAggregator` and listen to all events that have an event delegate with matching signature:
411411
```C#
412412

413413
// Subscribe by defining the event delegate explicitly
414414
aggregator.TryRegisterGlobalObserver(new PropertyChangedEventHandler(ShowMessage_OnPropertyChanged));
415+
```
416+
417+
Subscribe to the `EventAggregator` and listen to all events that use a matching `EventArgs` type:
415418

419+
```C#
416420
// Subscribe by defining the EventArgs as generic type parameter
417421
aggregator.TryRegisterGlobalObserver<PropertyChangedEventArgs>(ShowMessage_OnPropertyChanged);
418422
```

0 commit comments

Comments
 (0)