Exemple #1
0
        /// <summary>
        ///     Builds the explanation of the element
        /// </summary>
        /// <param name="explanation"></param>
        /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
        public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
        {
            explanation.Write(Called);
            explanation.Write("(");
            explanation.ExplainList(ActualParameters, explainSubElements, ", ",
                                    element => element.GetExplain(explanation));

            if (NamedActualParameters.Count > 0)
            {
                explanation.Indent(2, () =>
                {
                    if (ActualParameters.Count > 0)
                    {
                        explanation.Write(", ");
                    }
                    explanation.ExplainList(NamedActualParameters, explainSubElements, ", ", pair =>
                    {
                        if (AllParameters.Count > 1)
                        {
                            explanation.WriteLine();
                        }
                        explanation.Write(pair.Key);
                        explanation.Write(" => ");
                        explanation.Write(pair.Value);
                    });
                });
            }
            explanation.Write(")");
        }
Exemple #2
0
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     explanation.Write("FUNCTION ");
     explanation.ExplainList(Parameters, explainSubElements, ", ", parameter =>
     {
         explanation.Write(parameter.Name);
         explanation.Write(" : ");
         explanation.Write(parameter.TypeName);
     });
     explanation.Write(" => ");
     explanation.Write(Expression);
 }
Exemple #3
0
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     explanation.Write(Structure);
     explanation.WriteLine();
     explanation.Write("{");
     explanation.Indent(2, () => explanation.ExplainList(Associations, explainSubElements, ", ", element =>
     {
         explanation.WriteLine();
         explanation.Write(element.Key);
         explanation.Write(" => ");
         explanation.Write(element.Value);
     }));
     explanation.WriteLine();
     explanation.Write("}");
 }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     if (ListElements.Count > 0)
     {
         explanation.Write("[");
         explanation.Indent(2,
                            () => explanation.ExplainList(ListElements, explainSubElements, ", ",
                                                          element => element.GetExplain(explanation, explainSubElements)));
         explanation.Write("]");
     }
     else
     {
         explanation.Write("[]");
     }
 }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     Structure.GetExplain(explanation);
     explanation.Write("{");
     explanation.Indent(2, () => explanation.ExplainList(Associations, explainSubElements, ", ", element =>
     {
         explanation.WriteLine();
         element.Key.GetExplain(explanation);
         explanation.Write(" => ");
         element.Value.GetExplain(explanation);
     }));
     explanation.WriteLine();
     explanation.Write("}");
 }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     explanation.ExplainList(Arguments, true, ".", expression => expression.GetExplain(explanation));
 }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     explanation.Write("FUNCTION ");
     explanation.ExplainList(Parameters, explainSubElements, ", ", parameter =>
     {
         explanation.Write(parameter.Name);
         explanation.Write(" : ");
         explanation.Write(parameter.TypeName);
     });
     explanation.Write(" => ");
     explanation.Write(Expression);
 }
Exemple #8
0
        /// <summary>
        ///     Builds the explanation of the element
        /// </summary>
        /// <param name="explanation"></param>
        /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
        public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
        {
            Called.GetExplain(explanation);
            explanation.Write("(");
            explanation.ExplainList(ActualParameters, explainSubElements, ", ",
                element => element.GetExplain(explanation));

            if (NamedActualParameters.Count > 0)
            {
                explanation.Indent(2, () =>
                {
                    if (ActualParameters.Count > 0)
                    {
                        explanation.Write(", ");
                    }
                    explanation.ExplainList(NamedActualParameters, explainSubElements, ", ", pair =>
                    {
                        if (AllParameters.Count > 1)
                        {
                            explanation.WriteLine();
                        }
                        pair.Key.GetExplain(explanation);
                        explanation.Write(" => ");
                        pair.Value.GetExplain(explanation);
                    });
                });
            }
            explanation.Write(")");
        }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     if (ListElements.Count > 0)
     {
         explanation.Write("[");
         explanation.Indent(2,
             () => explanation.ExplainList(ListElements, explainSubElements, ", ",
                 element => element.GetExplain(explanation, explainSubElements)));
         explanation.Write("]");
     }
     else
     {
         explanation.Write("[]");
     }
 }
 /// <summary>
 ///     Builds the explanation of the element
 /// </summary>
 /// <param name="explanation"></param>
 /// <param name="explainSubElements">Precises if we need to explain the sub elements (if any)</param>
 public override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     explanation.ExplainList(Arguments, true, ".", expression => expression.GetExplain(explanation));
 }