Exemple #1
0
        public void SetCurrentLearning(StepsTypes learningType)
        {
            switch (learningType)
            {
            case StepsTypes.Preparation:
                _currentLearning = 0;
                break;

            case StepsTypes.PerformanceTest:
                _currentLearning = 1;
                break;

            case StepsTypes.FrequencyCheck:
                _currentLearning = 2;
                break;

            default:
                _currentLearning = 0;
                break;
            }

            FreezeAll();
            _learnings[_currentLearning].Unfreeze();
            if (_currentLearning == 2)
            {
                _model.SetWrongFrequencies();
            }
        }
Exemple #2
0
        public IPipeline CreatePipeline(T command)
        {
            var steps = StepsTypes.Select(s =>
            {
                return (IStep<T>)ServiceProvider.GetRequiredService(s);
            });

            var pipeline = new Pipeline<T>(command);
            pipeline.AddSteps(steps);
            return pipeline;
        }
Exemple #3
0
        public LearningBl(RadioModel model, Action completed, Action <int> stepChanged, StepsTypes learningType)
        {
            var learningFactory = new LearningFactory();

            _completed   = completed;
            _stepChanged = stepChanged;
            _model       = model;

            _learnings.Add(learningFactory.CreatePreparationToWorkLearning());
            _learnings.Add(learningFactory.CreatePerformanceTestLearning());
            _learnings.Add(learningFactory.CreateSettingFrequencies());

            InitAll();

            SetCurrentLearning(learningType);
        }