Example #1
0
 public TaskModelNotSequance(Conditions conditions, Descriptions descriptions, Action initializeFunction = null)
 {
     _conditions         = conditions;
     _descriptions       = descriptions;
     _initializeFunction = initializeFunction;
     _wasComplite        = false;
     if (descriptions.Count() != conditions.Length)
     {
         throw new Exception("Count invalid.");
     }
 }
Example #2
0
        public TaskModel(Conditions conditions, Descriptions descriptions, ISubscribesInitializer initializer, Action initializeFunction = null)
        {
            _conditions         = conditions;
            _descriptions       = descriptions;
            _initializeFunction = initializeFunction;

            if (descriptions.Count() != conditions.Length)
            {
                throw new Exception("Count invalid.");
            }
            _currentIndex         = 0;
            _checker              = new SequenceStepChecker(conditions, initializer);
            _checker.StepChanged += _checker_StepChanged;
            _checker.Start();
            _wasComplite = false;
        }
 public static int Count()
 {
     return(Descriptions.Count());
 }