Contains a collection of MessageAttributeFilters with the LogSubscriberInternal that is assigned to each segment.
Inheritance: MessageAttributeFilter
Esempio n. 1
0
        /// <summary>
        /// This method should be called with a lock on m_syncRoot
        /// </summary>
        private void CalculateRoutingTableForPublisherSync(List <LogSubscriberInternal> subscribers, LogPublisherInternal publisher)
        {
            MessageAttributeFilterCollection filterCollection = new MessageAttributeFilterCollection();

            foreach (var sub in subscribers)
            {
                filterCollection.Add(sub.GetSubscription(publisher), sub);
            }
            publisher.SubscriptionFilterCollection = filterCollection;
        }
        public LogPublisherInternal(LoggerInternal logger, Type type)
        {
            if ((object)type == null)
                throw new ArgumentNullException(nameof(type));
            if (type == null)
                throw new ArgumentNullException(nameof(type));
            if (logger == null)
                throw new ArgumentNullException(nameof(logger));

            Type = type;
            Assembly = type.Assembly;
            TypeData = new PublisherTypeDefinition(type);
            m_logger = logger;
            SubscriptionFilterCollection = new MessageAttributeFilterCollection();
        }
Esempio n. 3
0
        public LogPublisherInternal(LoggerInternal logger, Type type)
        {
            if ((object)type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            Type     = type;
            Assembly = type.Assembly;
            TypeData = new PublisherTypeDefinition(type);
            m_logger = logger;
            SubscriptionFilterCollection = new MessageAttributeFilterCollection();
        }
 /// <summary>
 /// This method should be called with a lock on m_syncRoot
 /// </summary>
 private void CalculateRoutingTableForPublisherSync(List<LogSubscriberInternal> subscribers, LogPublisherInternal publisher)
 {
     MessageAttributeFilterCollection filterCollection = new MessageAttributeFilterCollection();
     foreach (var sub in subscribers)
     {
         filterCollection.Add(sub.GetSubscription(publisher), sub);
     }
     publisher.SubscriptionFilterCollection = filterCollection;
 }