/// <summary> /// Advances the enumerator to the next element of the collection. /// </summary> /// <returns> /// True if the enumerator was successfully advanced to the next /// element; false if the enumerator has passed the end of the /// collection. /// </returns> public override Boolean MoveNext() { if (_InternalEnumerator == null) { return(false); } while (_InternalEnumerator.MoveNext()) { _Pipe.SetSource(new SingleEnumerator <S>(_InternalEnumerator.Current)); if (_Pipe.MoveNext()) { while (_Pipe.MoveNext()) { } _CurrentElement = _InternalEnumerator.Current; return(true); } } return(false); }
private List <ControlContextEvaluation> InternalEvaluate(MashupConfiguration c) { List <ControlContextEvaluation> result = new List <ControlContextEvaluation>(); MashupContainer container = c.Build(); IPipe pipe = container.Pipe; while (pipe.MoveNext()) { ResultWithContext eval = pipe.Current as ResultWithContext; if (eval != null) { Debug.Unindent(); Debug.WriteLine(string.Format("Evaluating Context {0} with result {1}", eval.Context, eval.Result), "ControlContext"); bool boolEval = false; if (eval.Result is bool b) { boolEval = b; } IContext mergedContext = Information.Context.Merge(eval.Context); ControlContextEvaluation evaluation = new ControlContextEvaluation(mergedContext, boolEval); result.Add(evaluation); Debug.WriteLine("Evaluation: " + evaluation, "ControlContext"); Debug.Indent(); } Debug.WriteLineIf(eval == null, "Evaluation is null", "ControlContext"); } return(result); }