コード例 #1
0
        public void SetUp()
        {
            _logger = new Mock <ILogger>();

            ComposeMefContainer();

            var factory = _container.GetExportedValue <IModuleSimulatorFactory>();

            _moduleA = factory.CreateModule();
            _moduleA.Initialize(10, "ModuleA");
            _moduleB = factory.CreateModule();
            _moduleB.Initialize(10, "ModuleB");
            factory.TriggerContainerRecomposition();

            _taktManager = _container.GetExportedValue <ITaktManager>();
            _container.GetExportedValue <SimulatedItemFlowManager>();
        }
コード例 #2
0
 public SimulationInitializer(
     IModuleBusManager moduleBusManager,
     IModuleSimulatorFactory factory,
     IModuleSimulatorRepository moduleRepository,
     ITaktManager taktManager,
     SimulationAlarmHandler alarmHandler,
     SimulatedItemFlowManager itemFlowManager,
     [ImportMany(typeof(ISimulatedBehavior))] IEnumerable <Lazy <ISimulatedBehavior> > simulatedBehaviors)
 {
     _moduleBusManager   = moduleBusManager;
     _factory            = factory;
     _moduleRepository   = moduleRepository;
     _taktManager        = taktManager;
     _alarmHandler       = alarmHandler;
     _itemFlowManager    = itemFlowManager;
     _simulatedBehaviors = simulatedBehaviors;
 }