コード例 #1
0
        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);
            }
        }
コード例 #2
0
ファイル: RhinoContainer.cs プロジェクト: r2-r/rhino-commons
        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();
        }
コード例 #3
0
        /// <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();
        }