<commit_before>namespace MassTransit.Topology
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Configuration;


    public class MessagePublishTopology<TMessage> :
        IMessagePublishTopologyConfigurator<TMessage>
        where TMessage : class
    {
        readonly IList<IMessagePublishTopologyConvention<TMessage>> _conventions;
        readonly IList<IMessagePublishTopology<TMessage>> _delegateTopologies;
        readonly IList<IMessagePublishTopology<TMessage>> _topologies;

        public MessagePublishTopology()
        {
            _conventions = new List<IMessagePublishTopologyConvention<TMessage>>();
            _topologies = new List<IMessagePublishTopology<TMessage>>();
            _delegateTopologies = new List<IMessagePublishTopology<TMessage>>();

            if (typeof(TMessage).GetCustomAttributes(typeof(ExcludeFromTopologyAttribute), false).Any())
                Exclude = true;
        }

        public bool Exclude { get; set; }

        public void Add(IMessagePublishTopology<TMessage> publishTopology)
        {<commit_msg>Exclude Fault<T> message types from publish topology when T is excluded from topology<commit_after>namespace MassTransit.Topology
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Configuration;
    using Internals;


    public class MessagePublishTopology<TMessage> :
        IMessagePublishTopologyConfigurator<TMessage>
        where TMessage : class
    {
        readonly IList<IMessagePublishTopologyConvention<TMessage>> _conventions;
        readonly IList<IMessagePublishTopology<TMessage>> _delegateTopologies;
        readonly IList<IMessagePublishTopology<TMessage>> _topologies;

        public MessagePublishTopology()
        {
            _conventions = new List<IMessagePublishTopologyConvention<TMessage>>();
            _topologies = new List<IMessagePublishTopology<TMessage>>();
            _delegateTopologies = new List<IMessagePublishTopology<TMessage>>();

            if (typeof(TMessage).GetCustomAttributes(typeof(ExcludeFromTopologyAttribute), false).Any()
                || typeof(TMessage).ClosesType(typeof(Fault<>), out Type[] types)
                && types[0].GetCustomAttributes(typeof(ExcludeFromTopologyAttribute), false).Any())
                Exclude = true;
        }

        public bool Exclude { get; set; }

        public void Add(IMessagePublishTopology<TMessage> publishTopology)
        {
{'fraction_non_alphanumeric': 0.08125502815768303, 'fraction_numerical': 0.00040225261464199515, 'mean_word_length': 3.4095744680851063, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3874332', 'n_tokens_mistral': 671, 'n_tokens_neox': 654, 'n_words': 122}