<commit_before>namespace MassTransit.Dashboard
{
    using Castle.Core.Resource;
    using Castle.Facilities.Startable;
    using Castle.MicroKernel.Registration;
    using Castle.MonoRail.WindsorExtension;
    using Castle.Windsor;
    using Castle.Windsor.Configuration.Interpreters;
    using Controllers;
    using MassTransit.ServiceBus.MSMQ;
    using MassTransit.ServiceBus.Subscriptions;
    using ServiceBus;

    public class WebAppContainer :
        WindsorContainer
    {
        public WebAppContainer()
            : base(new XmlInterpreter(new ConfigResource()))
        {
            RegisterFacilities();
            LoadMassTransit();
            RegisterComponents();
        }

        protected void RegisterFacilities()
        {
            AddFacility("rails", new MonoRailFacility());
            AddFacility("startable", new StartableFacility());
        }

        protected void RegisterComponents()
        {
            AddComponent("home.controller", typeof(SubscriptionsController));
        }

        protected void LoadMassTransit()
        {
            this.Register(
                Component.For<IEndpoint>()
                    .ImplementedBy<MsmqEndpoint>()
                    .Named("masstransit.bus.listen")
                    .Parameters(Parameter.ForKey("uriString").Eq("msmq://localhost/mt_dashboard")),
                Component.For<IServiceBus>()
                    .ImplementedBy<ServiceBus>()
                    .Named("masstransit.bus")
                    .Parameters(Parameter.ForKey("endpointToListenOn").Eq("${masstransit.bus.listen}")),
                Component.For<IEndpoint>()
                    .ImplementedBy<MsmqEndpoint>()
                    .Named("masstransit.subscription.endpoint")
                    .Parameters(Parameter.ForKey("uriString").Eq("msmq://localhost/mt_pubsub")),
                Component.For<IHostedService>()
                    .ImplementedBy<SubscriptionClient>()
                    .Named("masstransit.subscription.client")
                    .ExtendedProperties(
                        Property.ForKey("startable").Eq("true"),
                        Property.ForKey("startMethod").Eq("Start"),
                        Property.ForKey("stopMethod").Eq("Stop"))
                    .Parameters(Parameter.ForKey("subscriptionServiceEndpoint").Eq("${masstransit.subscription.endpoint}")),
                Component.For<ISubscriptionCache>()
                    .ImplementedBy<LocalSubscriptionCache>()
                    .Named("masstransit.cache")
                );
        }
    }
}<commit_msg>moved to entirely code based config<commit_after>namespace MassTransit.Dashboard
{
    using Castle.Facilities.Startable;
    using Castle.MicroKernel.Registration;
    using Castle.MonoRail.WindsorExtension;
    using Castle.Windsor;
    using Controllers;
    using MassTransit.ServiceBus.MSMQ;
    using MassTransit.ServiceBus.Subscriptions;
    using ServiceBus;

    public class WebAppContainer :
        WindsorContainer
    {
        public WebAppContainer()
        {
            RegisterFacilities();
            LoadMassTransit();
            RegisterComponents();
        }

        protected void RegisterFacilities()
        {
            AddFacility("rails", new MonoRailFacility());
            AddFacility("startable", new StartableFacility());
        }

        protected void RegisterComponents()
        {
            AddComponent("home.controller", typeof(SubscriptionsController));
        }

        protected void LoadMassTransit()
        {
            this.Register(
                Component.For<IEndpoint>()
                    .ImplementedBy<MsmqEndpoint>()
                    .Named("masstransit.bus.listen")
                    .Parameters(Parameter.ForKey("uriString").Eq("msmq://localhost/mt_dashboard")),
                Component.For<IServiceBus>()
                    .ImplementedBy<ServiceBus>()
                    .Named("masstransit.bus")
                    .Parameters(Parameter.ForKey("endpointToListenOn").Eq("${masstransit.bus.listen}")),
                Component.For<IEndpoint>()
                    .ImplementedBy<MsmqEndpoint>()
                    .Named("masstransit.subscription.endpoint")
                    .Parameters(Parameter.ForKey("uriString").Eq("msmq://localhost/mt_pubsub")),
                Component.For<IHostedService>()
                    .ImplementedBy<SubscriptionClient>()
                    .Named("masstransit.subscription.client")
                    .AddAttributeDescriptor("startable", "true")
                    .AddAttributeDescriptor("startMethod", "Start")
                    .AddAttributeDescriptor("stopMethod", "Stop")
                    .Parameters(Parameter.ForKey("subscriptionServiceEndpoint").Eq("${masstransit.subscription.endpoint}")),
                Component.For<ISubscriptionCache>()
                    .ImplementedBy<LocalSubscriptionCache>()
                    .Named("masstransit.cache")
                );
        }
    }
}
{'fraction_non_alphanumeric': 0.10969540115468843, 'fraction_numerical': 0.0, 'mean_word_length': 1.9431751611013475, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '237505', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1194, 'n_words': 150}