/// <summary>
        ///     Creates an instance of <see cref="IFileBasedDiContainerConfigurator" /> for file based dependency injection
        ///     configuration.
        /// </summary>
        /// <param name="fileBasedConfigurationParameters">An instance of <see cref="FileBasedConfigurationParameters"/> used to load and process the configuration file.</param>
        /// <param name="loadedConfiguration">
        ///     Output parameter that returns an instance of
        ///     <see cref="ConfigurationFile.IConfiguration" />.
        /// </param>
        /// <exception cref="ConfigurationParseException">Throws this exception if configuration parse/load fails.</exception>
        /// <exception cref="LoggerWasNotInitializedException"></exception>
        /// <exception cref="OROptimizer.DynamicCode.DynamicCodeGenerationException">Throws this exception if dynamic code generation fails.</exception>
        /// <exception cref="Exception">Throws this exception.</exception>
        public IFileBasedDiContainerConfigurator StartFileBasedDi([NotNull] FileBasedConfigurationParameters fileBasedConfigurationParameters,
                                                                  out IConfiguration loadedConfiguration)
        {
            if (!LogHelper.IsContextInitialized)
            {
                throw new LoggerWasNotInitializedException();
            }

            var configuration = new FileBasedConfiguration(fileBasedConfigurationParameters);

            configuration.Init();
            loadedConfiguration = configuration.Configuration;
            return(new FileBasedDiContainerConfigurator(configuration));
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="FileBasedDiContainerConfigurator" /> class.
 /// </summary>
 /// <param name="fileBasedConfiguration">The file based configuration.</param>
 public FileBasedDiContainerConfigurator([NotNull] FileBasedConfiguration fileBasedConfiguration) : base(fileBasedConfiguration)
 {
 }
Beispiel #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="FileBasedConfiguratorAbstr" /> class.
 /// </summary>
 /// <param name="fileBasedConfiguration">The file based configuration.</param>
 public FileBasedConfiguratorAbstr([NotNull] FileBasedConfiguration fileBasedConfiguration)
 {
     _fileBasedConfiguration = fileBasedConfiguration;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="FileBasedDiModulesConfigurator" /> class.
 /// </summary>
 /// <param name="fileBasedConfiguration">The file based configuration.</param>
 public FileBasedDiModulesConfigurator([NotNull] FileBasedConfiguration fileBasedConfiguration) : base(fileBasedConfiguration)
 {
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="FileBasedContainerStarter" /> class.
 /// </summary>
 /// <param name="fileBasedConfiguration">The file based configuration.</param>
 public FileBasedContainerStarter([NotNull] FileBasedConfiguration fileBasedConfiguration) : base(fileBasedConfiguration)
 {
 }