Beispiel #1
0
        public TickExecutor(TickRepository repository, IFeedback feedback)
        {
            this.repository = repository;
            this.feedback   = feedback;

            this.timer = new Timer(OnTick);
        }
Beispiel #2
0
        public static void Initialize(IBootstrapper bootstrapper, IFeedback feedback)
        {
            TickRepository repository = new TickRepository();
            TickExecutor   executor   = new TickExecutor(repository, feedback);

            foreach (Type type in bootstrapper.FindAllFactories())
            {
                repository.Add((IFactory)Activator.CreateInstance(type));
            }

            foreach (Type type in bootstrapper.FindAllTasks())
            {
                repository.Add((ITask)Activator.CreateInstance(type));
            }

            executor.Start();
        }