Exemplo n.º 1
0
        void State_Starting(State state)
        {
            if (!_context.controlIteration || !_context.controlRecordingIteration)
            {
                return;
            }

            var key = new ElementId("STATE_" + state.name, null);

            if (_iterations.ContainsKey(key))
            {
                return;
            }

            List <Mutator> mutators = new List <Mutator>();

            foreach (Type t in _mutators)
            {
                // can add specific mutators here
                if (SupportedState(t, state))
                {
                    var mutator = GetMutatorInstance(t, state);
                    mutators.Add(mutator);
                }
            }

            if (mutators.Count > 0)
            {
                _iterations.Add(key, mutators);
            }
        }