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


C# TextualExplanation.Write方法代码示例

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


在下文中一共展示了TextualExplanation.Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
        {
            explanation.Write(Operator);
            explanation.Write(" ");
            explanation.Write(IteratorVariable.Name);
            explanation.Write(" IN ");
            ListExpression.GetExplain(explanation);

            if (Condition != null)
            {
                explanation.Write(" | ");
                Condition.GetExplain(explanation);
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:19,代码来源:FirstExpression.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.Write("LET ");
     explanation.Write(BoundVariable.Name);
     explanation.Write(" <- ");
     explanation.Write(BindingExpression);
     explanation.Write(" IN ");
     explanation.Write(Expression);
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:14,代码来源:LetExpression.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)
 {
     explanation.Write(Image);
 }
开发者ID:ERTMSSolutions,项目名称:ERTMSFormalSpecs,代码行数:9,代码来源:Designator.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("INSERT ");
            Value.GetExplain(explanation);
            explanation.Write(" IN ");
            ListExpression.GetExplain(explanation);

            if (ReplaceElement != null)
            {
                explanation.Write(" WHEN FULL REPLACE");
                ReplaceElement.GetExplain(explanation);
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:18,代码来源:InsertStatement.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 (Term != null)
     {
         explanation.Write(Term);
     }
     else
     {
         if (UnaryOp != null)
         {
             explanation.Write(UnaryOp);
             if (Expression != null)
             {
                 explanation.Write(" ");
                 explanation.Write(Expression);
             }
         }
         else if (Expression != null)
         {
             explanation.Write(" (");
             explanation.Write(Expression);
             explanation.Write(" )");
         }
     }
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:30,代码来源:UnaryExpression.cs

示例6: 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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
        {
            explanation.Write("FOLDER ");
            explanation.WriteLine(Name);

            if (explainSubElements)
            {
                explanation.Indent(2, () =>
                {
                    foreach (Folder folder in Folders)
                    {
                        folder.GetExplain(explanation, explainSubElements);
                    }
                });
            }

            explanation.Indent(2, () =>
            {
                foreach (Translation translation in Translations)
                {
                    translation.GetExplain(explanation, explainSubElements);
                }
            });
            explanation.Write("END FOLDER ");
            explanation.WriteLine(Name);
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:31,代码来源:Folder.cs

示例7: 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)
        {
            explanation.Comment(this);
            explanation.Write("FUNCTION ");
            explanation.Write(Name);
            explanation.Write(" (");
            if (FormalParameters.Count > 0)
            {
                explanation.Indent(2, () =>
                {
                    bool first = true;
                    foreach (Parameter parameter in FormalParameters)
                    {
                        if (first)
                        {
                            explanation.WriteLine();
                            first = false;
                        }
                        else
                        {
                            explanation.WriteLine(",");
                        }
                        parameter.GetExplain(explanation, true);
                    }
                });
            }
            explanation.WriteLine(")");
            explanation.Write("RETURNS ");
            explanation.WriteLine(TypeName);

            {
                bool first = true;
                foreach (Case cas in Cases)
                {
                    if (!first)
                    {
                        explanation.Write("ELSE ");
                    }
                    cas.GetExplain(explanation, explainSubElements);
                    explanation.WriteLine();
                    first = false;
                }
            }
            explanation.Write("END FUNCTION");
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:50,代码来源:Function.cs

示例8: 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)
        {
            explanation.Comment(this);

            if (!IsAbstract)
            {
                explanation.Write("STRUCTURE ");
            }
            else
            {
                explanation.Write("INTERFACE ");
            }
            explanation.WriteLine(Name);

            explanation.Indent(2, () =>
            {
                foreach (Structure structure in Interfaces)
                {
                    if (structure != null)
                    {
                        explanation.Write("IMPLEMENTS ");
                        explanation.WriteLine(structure.Name);
                    }
                }

                foreach (StructureElement element in Elements)
                {
                    element.GetExplain(explanation, explainSubElements);
                }

                if (!IsAbstract)
                {
                    foreach (Procedure procedure in Procedures)
                    {
                        procedure.GetExplain(explanation, explainSubElements);
                    }

                    foreach (StateMachine stateMachine in StateMachines)
                    {
                        stateMachine.GetExplain(explanation, explainSubElements);
                    }

                    foreach (Rule rule in Rules)
                    {
                        rule.GetExplain(explanation, explainSubElements);
                    }
                }
            });

            if (!IsAbstract)
            {
                explanation.WriteLine("END STRUCTURE");
            }
            else
            {
                explanation.WriteLine("END INTERFACE");
            }
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:63,代码来源:Structure.cs

示例9: 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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
        {
            explanation.Comment(this);

            if (!string.IsNullOrEmpty(getCondition()))
            {
                explanation.Write("IF ");
                if (ConditionTree != null)
                {
                    ConditionTree.GetExplain(explanation);
                }
                else
                {
                    explanation.Write(getCondition());
                }
                explanation.WriteLine(" THEN");
                explanation.Indent(2, () => explanation.Expression(this));
                explanation.WriteLine("END IF");

            }
            else
            {
                explanation.Expression(this);
                explanation.WriteLine();
            }
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:31,代码来源:Expectation.cs

示例10: 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)
 {
     VariableIdentification.GetExplain(explanation);
     explanation.Write(" <- ");
     Expression.GetExplain(explanation);
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:11,代码来源:VariableUpdateStatement.cs

示例11: 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("REPLACE ");
     Condition.GetExplain(explanation);
     explanation.Write(" IN ");
     ListExpression.GetExplain(explanation);
     explanation.Write(" BY ");
     Value.GetExplain(explanation);
 }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:14,代码来源:ReplaceStatement.cs

示例12: 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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
        {
            explanation.Comment(this);
            explanation.Write("PROCEDURE ");
            explanation.Write(Name);

            if (FormalParameters.Count > 0)
            {
                bool first = true;
                explanation.Write("(");
                if (FormalParameters.Count > 1)
                {
                    explanation.WriteLine();
                }

                explanation.Indent(4, () =>
                {
                    foreach (Parameter parameter in FormalParameters)
                    {
                        if (!first)
                        {
                            explanation.WriteLine(",");
                        }
                        explanation.Write(parameter.Name);
                        explanation.Write(" : ");
                        explanation.Write(parameter.TypeName);
                        first = false;
                    }
                });
                explanation.WriteLine(")");
            }
            else
            {
                explanation.WriteLine("()");
            }

            explanation.Indent(2, () =>
            {
                foreach (Rule rule in Rules)
                {
                    rule.GetExplain(explanation, explainSubElements);
                    explanation.WriteLine();
                }
            });

            explanation.WriteLine("END PROCEDURE ");
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:52,代码来源:Procedure.cs

示例13: 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("APPLY ");
     AppliedStatement.GetExplain(explanation);
     explanation.Write(" ON ");
     ListExpression.GetExplain(explanation);
     if (ConditionExpression != null)
     {
         explanation.Write(" | ");
         ConditionExpression.GetExplain(explanation);
     }
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:17,代码来源:ApplyStatement.cs

示例14: 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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
 {
     explanation.Write("MODEL EVENT ");
     explanation.WriteLine(ToString());
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:10,代码来源:ModelEvents.cs

示例15: 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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
 {
     explanation.Comment(this);
     explanation.Write("NAMESPACE ");
     explanation.WriteLine(Name);
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:11,代码来源:NameSpace.cs


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