示例#1
0
        /// <summary>
        /// Apply the module to the container.
        /// </summary>
        /// <param name="engine">The engine.</param>
        public void Configure(IConfigurationEngine engine)
        {
            Contract.Require.That(engine, Is.Not.Null).When("retrieving argument engine in Configure method");

            Load();
            Build(engine.ConfigurationStore);
        }
示例#2
0
        /// <summary>
        /// Apply the module to the container.
        /// </summary>
        /// <param name="engine">The engine.</param>
        public void Configure(IConfigurationEngine engine)
        {
            Contract.Require.That(engine, Is.Not.Null).When("retrieving argument engine in Configure method");

            Load();
            Build(engine.ConfigurationStore);
        }
示例#3
0
        protected virtual void TestFixtureSetUp()
        {
            LogManager.Adapter = new ConsoleOutLoggerFA(new NameValueCollection());

            ConfigurationEngine = new DefaultConfigurationEngine();
            ConfigurationEngine.RegisterInterpreter(new XmlConfigurationInterpreter("SqlMap.config"));

            IMapperFactory mapperFactory = ConfigurationEngine.BuildMapperFactory();

            SessionFactory = ConfigurationEngine.ModelStore.SessionFactory;
            DataMapper     = ((IDataMapperAccessor)mapperFactory).DataMapper;
        }
示例#4
0
        protected virtual void TestFixtureSetUp()
        {
            LogManager.Adapter = new ConsoleOutLoggerFA(new NameValueCollection());
            configurationSetting = new ConfigurationSetting();
            configurationSetting.Properties.Add("collection2Namespace", "MyBatis.DataMapper.Sqlite.Test.Domain.LineItemCollection2, MyBatis.DataMapper.Sqlite.Test");
            configurationSetting.Properties.Add("nullableInt", "int?");

            ConfigurationEngine = new DefaultConfigurationEngine(configurationSetting);
            ConfigurationEngine.RegisterInterpreter(new XmlConfigurationInterpreter("SqlMap.config"));
            ConfigurationEngine.RegisterModule(new AliasModule());

            IMapperFactory mapperFactory = ConfigurationEngine.BuildMapperFactory();
            sessionFactory = ConfigurationEngine.ModelStore.SessionFactory;
            dataMapper = ((IDataMapperAccessor)mapperFactory).DataMapper;
        }
示例#5
0
        protected virtual void TestFixtureSetUp()
        {
            LogManager.Adapter   = new ConsoleOutLoggerFA(new NameValueCollection());
            configurationSetting = new ConfigurationSetting();
            configurationSetting.Properties.Add("collection2Namespace", "MyBatis.DataMapper.Sqlite.Test.Domain.LineItemCollection2, MyBatis.DataMapper.Sqlite.Test");
            configurationSetting.Properties.Add("nullableInt", "int?");

            ConfigurationEngine = new DefaultConfigurationEngine(configurationSetting);
            ConfigurationEngine.RegisterInterpreter(new XmlConfigurationInterpreter("SqlMap.config"));
            ConfigurationEngine.RegisterModule(new AliasModule());

            IMapperFactory mapperFactory = ConfigurationEngine.BuildMapperFactory();

            sessionFactory = ConfigurationEngine.ModelStore.SessionFactory;
            dataMapper     = ((IDataMapperAccessor)mapperFactory).DataMapper;
        }
示例#6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EngineMediator"/> class.
        /// </summary>
        /// <param name="machineState">
        /// The machine State.
        /// </param>
        /// <param name="executionEngine">
        /// The execution engine.
        /// </param>
        /// <param name="inputOutputEngine">
        /// The input output engine.
        /// </param>
        /// <param name="configurationEngine">
        /// The configuration engine.
        /// </param>
        /// <param name="romService">
        /// The rom service.
        /// </param>
        public EngineMediator(
            IMachineState machineState,
            IExecutionEngine executionEngine,
            IInputOutputEngine inputOutputEngine,
            IConfigurationEngine configurationEngine,
            IRomService romService)
        {
            this.MachineState        = machineState;
            this.ExecutionEngine     = executionEngine;
            this.InputOutputEngine   = inputOutputEngine;
            this.ConfigurationEngine = configurationEngine;
            this.RomService          = romService;

            // Assign the mediator to the engines, avoiding circular dependency with IoC
            this.ExecutionEngine.SetMediator(this);
            this.InputOutputEngine.SetMediator(this);
            this.ConfigurationEngine.SetMediator(this);
        }
 public CacheRefreshJob(IConfigurationEngine configurationEngine)
 {
     _configurationEngine = configurationEngine;
 }
示例#8
0
 public ConfigManagerController(IConfigurationEngine configurationEngine)
 {
     _configurationEngine = configurationEngine;
 }