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);
        }
 private ControlContextEvaluation MergeContextEvaluation(ControlContextEvaluation evaluation, ControlContextEvaluation p)
 {
     evaluation.Evaluation = evaluation.Evaluation && p.Evaluation;
     return(evaluation);
 }