Exemplo n.º 1
0
        internal ServicesAdvancedConfiguration(ServicesConfiguration services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            _registrations = new Dictionary <Type, Registration>();
            _installers    = new List <IWindsorInstaller>();

            Register <ILogger, DbLogger, EventLogger>();
            Register <IConfigurationRepository, DbConfigurationRepository, FileBasedConfigurationRepository>();
            Register <IArchiveService, DbArchiveService, FileBasedArchiveService>();
            Register <IDistributedMutex, DbDistributedMutex, ThrowingDistributedMutex>();
            Register <IRuntimeSettings, AppConfigRuntimeSettings>();
            Register <IFeatureToggler, InMemoryFeatureToggler>();

            Register(kernel => Environment.UserInteractive ? Console.Out : TextWriter.Null);

            if (AzureWebJobShutdownRequest.IsRunningInAzure())
            {
                Register <IWaitForShutdownRequest, AzureWebJobShutdownRequest>();
            }
            else
            {
                Register <IWaitForShutdownRequest, WaitForEscapeKey>();
            }

            Services = services;
        }
        public ServicesInterceptorsConfiguration(ServicesConfiguration services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            _registrations = new List <Registration>();

            Services = services;
        }
Exemplo n.º 3
0
        internal ServicesConventionsConfiguration(ServicesConfiguration services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            _installer = new ConventionInstaller();

            // Add own assembly
            AddFromAssemblyOfThis <ServicesConventionsConfiguration>()
            .Ignore <IApplicationContext>()
            .Ignore <ITarget>()
            .Ignore <CsvRow.ICsvRowBuilder>();

            Services = services
                       .Advanced(advanced => advanced
                                 .Install(_installer));
        }