Appccelerate.EventBroker.Internals.EventTopic.CheckMatchers C# (CSharp) Method

CheckMatchers() private method

Checks whether the event of the publisher has to be relayed to the subscriber (Matchers).
private CheckMatchers ( IPublication publication, ISubscription subscription, EventArgs e ) : bool
publication IPublication
subscription ISubscription
e System.EventArgs
return bool
        private bool CheckMatchers(IPublication publication, ISubscription subscription, EventArgs e)
        {
            bool match = publication.PublicationMatchers.Aggregate(
                true,
                (current, publicationMatcher) => current & publicationMatcher.Match(publication, subscription, e));

            match = this.globalMatchersProvider.Matchers.Aggregate(
                match,
                (current, globalMatcher) => current & globalMatcher.Match(publication, subscription, e));

            return subscription.SubscriptionMatchers.Aggregate(
                match,
                (current, subscriptionMatcher) => current & subscriptionMatcher.Match(publication, subscription, e));
        }