Subscription Filtering
Subscribers may not need to handle every instance of a published event. In these cases, the subscriber can subscribe and supply a delegate that filters the event before the registered handler is called. Frequently, this filter is supplied as a lambda expression, as shown in the following code.
C#Copy
FundAddedEvent fundAddedEvent = eventAggregator.GetEvent<FundAddedEvent>();
fundAddedEvent.Subscribe(FundAddedEventHandler,
ThreadOption.UIThread, false,
fundOrder => fundOrder.CustomerId == _customerId);