Esempio n. 1
0
        public void Configure(ISImplHostBuilder hostBuilder, Action <ISImplHostBuilder> configureDelegate)
        {
            // Configure the stack host (aka attach all stack host modules)
            configureDelegate?.Invoke(hostBuilder);

            // Initialize all stack host modules
            // If host app is configures, PreInit will attach application modules
            _bootManager.PreInit();

            // Modules configure the host builder
            _bootManager.ConfigureHostBuilder(hostBuilder);

            // All modules (host and application) has been attached
            // Modules register services
            _bootManager.ConfigureServices(hostBuilder);
        }
        public IEnumerable <IPreInitModule> PreInit()
        {
            _logger.LogDebug("HostBootManager > PreInit > started");
            var processed = _bootManager.PreInit().ToArray();

            _logger.LogDebug("HostBootManager > PreInit > Module PreInit sequence");
            foreach (var module in processed)
            {
                _logger.LogDebug($" - {module.Name}");
            }
            _logger.LogDebug("HostBootManager > PreInit > Module boot sequence");
            foreach (var module in _bootSequenceFactory.New())
            {
                _logger.LogDebug($" - {module.Name}");
            }
            _logger.LogDebug("HostBootManager > PreInit > ended");

            return(processed);
        }