当前位置: 首页>>代码示例>>C#>>正文


C# TextualExplanation.ExplainList方法代码示例

本文整理汇总了C#中TextualExplanation.ExplainList方法的典型用法代码示例。如果您正苦于以下问题:C# TextualExplanation.ExplainList方法的具体用法?C# TextualExplanation.ExplainList怎么用?C# TextualExplanation.ExplainList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextualExplanation的用法示例。


在下文中一共展示了TextualExplanation.ExplainList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetExplain

 /// <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("}");
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:19,代码来源:StructExpression.cs

示例2: GetExplain

 /// <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));
 }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:9,代码来源:DerefExpression.cs

示例3: GetExplain

        /// <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(")");
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:34,代码来源:Call.cs

示例4: GetExplain

 /// <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);
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:17,代码来源:FunctionExpression.cs

示例5: GetExplain

 /// <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("[]");
     }
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:20,代码来源:ListExpression.cs


注:本文中的TextualExplanation.ExplainList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。