/// <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(); }
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; }