public void SetUp(IWindsorContainer container, IConfigurationStore store)
        {
            string name = null;

            name = env != null?env.GetEnvironmentName() : "ResourceWindsor";

            if (uri != null)
            {
                BooReader.Read(container, uri, name);
            }
            else
            {
                BooReader.Read(container, fileName, name);
            }
        }
Exemple #2
0
        private void InitalizeFromConfigurationSource(IConfigurationInterpreter interpreter,
                                                      IEnvironmentInfo env)
        {
            var conversionManager = (DefaultConversionManager)Kernel.GetSubSystem(SubSystemConstants.ConversionManagerKey);

            conversionManager.Add(new ConfigurationObjectConverter());

            if (env != null)
            {
                interpreter.EnvironmentName = env.GetEnvironmentName();
            }

            interpreter.ProcessResource(interpreter.Source, Kernel.ConfigurationStore, Kernel);
            RunInstaller();
        }
        /// <summary>
        ///   Initializes a new instance of the <see cref = "WindsorContainer" /> class.
        /// </summary>
        /// <param name = "interpreter">The interpreter.</param>
        /// <param name = "environmentInfo">The environment info.</param>
        public WindsorContainer(IConfigurationInterpreter interpreter, IEnvironmentInfo environmentInfo) : this()
        {
            if (interpreter == null)
            {
                throw new ArgumentNullException("interpreter");
            }
            if (environmentInfo == null)
            {
                throw new ArgumentNullException("environmentInfo");
            }

            interpreter.EnvironmentName = environmentInfo.GetEnvironmentName();
            interpreter.ProcessResource(interpreter.Source, kernel.ConfigurationStore, kernel);

            RunInstaller();
        }