• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TextualExplanation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

            if (Condition != null)
            {
                explanation.Write(" | ");
                explanation.Write(Condition);
            }
        }
开发者ID:ERTMSSolutions,项目名称:ERTMSFormalSpecs,代码行数:19,代码来源:ThereIsExpression.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(OPERATOR);
            explanation.Write(" ");
            ListExpression.GetExplain(explanation);

            if (Condition != null)
            {
                explanation.Write(" | ");
                Condition.GetExplain(explanation);
            }

            explanation.Write(" USING ");
            explanation.Write(IteratorVariable.Name);
            explanation.Write(" IN ");
            IteratorExpression.GetExplain(explanation);
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:22,代码来源:MapExpression.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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
        {
            explanation.Comment(Name);

            explanation.Indent(2, () =>
            {
                foreach (Action action in Actions)
                {
                    action.GetExplain(explanation, explainSubElements);
                    explanation.WriteLine();
                }
            });

            explanation.WriteLine("IMPLIES");

            explanation.Indent(2, () =>
            {
                foreach (Expectation expectation in Expectations)
                {
                    expectation.GetExplain(explanation, explainSubElements);
                    explanation.WriteLine();
                }
            });
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:29,代码来源:SubStep.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("REMOVE ");

            switch (Position)
            {
                case PositionEnum.First:
                    explanation.Write("FIRST ");
                    break;

                case PositionEnum.Last:
                    explanation.Write("LAST ");
                    break;

                case PositionEnum.All:
                    explanation.Write("ALL ");
                    break;
            }

            if (Condition != null)
            {
                explanation.Write(Condition);
            }

            explanation.Write(" IN ");
            explanation.Write(ListExpression);
        }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:32,代码来源:RemoveStatement.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)
 {
     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


示例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("REQUIREMENT SET ");
     explanation.WriteLine(Name);
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:10,代码来源:RequirementSet.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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
        {
            explanation.Write("STATE ");
            explanation.WriteLine(Name);

            if (explainSubElements)
            {
                foreach (Rule rule in StateMachine.Rules)
                {
                    // ReSharper disable once ConditionIsAlwaysTrueOrFalse
                    rule.GetExplain(explanation, explainSubElements);
                    explanation.WriteLine();
                }
            }
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:20,代码来源:State.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)
        {
            base.GetExplain(explanation, explainSubElements);
            explanation.Write("RANGE ");
            explanation.Write(Name);
            explanation.Write(" FROM ");
            explanation.Write(MinValue);
            explanation.Write(" TO ");
            explanation.WriteLine(MaxValue);

            explanation.Indent(2, () =>
            {
                foreach (EnumValue enumValue in SpecialValues)
                {
                    enumValue.GetExplain(explanation, explainSubElements);
                }
            });
        }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:23,代码来源:Range.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 override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     if (Designator != null)
     {
         explanation.Write(Designator);
     }
     else if (LiteralValue != null)
     {
         explanation.Write(LiteralValue);
     }
 }
开发者ID:ERTMSSolutions,项目名称:ERTMSFormalSpecs,代码行数:16,代码来源:Term.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 void GetExplain(TextualExplanation explanation, bool explainSubElements)
 {
     explanation.Write(Name);
     explanation.Write(" : ");
     explanation.Write(TypeName);
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:11,代码来源:Parameter.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 virtual void GetExplain(TextualExplanation explanation, bool explainSubElements)
 {
     explanation.Comment(this);
     explanation.Write(Name);
     if (!String.IsNullOrEmpty(getValue()))
     {
         explanation.WriteLine(" : " + getValue());
     }
     else
     {
         explanation.WriteLine();
     }
 }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:18,代码来源:EnumValue.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 override void GetExplain(TextualExplanation explanation, bool explainSubElements)
 {
     base.GetExplain(explanation, explainSubElements);
     explanation.Write("STATE MACHINE ");
     explanation.WriteLine(Name);
     explanation.Indent(2, () =>
     {
         foreach (State state in States)
         {
             state.GetExplain(explanation, false);
         }
         foreach (Rule rule in Rules)
         {
             rule.GetExplain(explanation, explainSubElements);
         }
     });
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:22,代码来源:StateMachine.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("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


示例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.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


示例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 override void GetExplain(TextualExplanation explanation, bool explainSubElements = true)
 {
     Call.GetExplain(explanation);
 }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:9,代码来源:ProcedureCallStatement.cs


示例16: 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.Expression(this);
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:10,代码来源:Action.cs


示例17: 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


示例18: 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)
 {
     base.GetExplain(explanation, explainSubElements);
     explanation.Write("COLLECTION ");
     explanation.Write(Name);
     explanation.Write(" OF ");
     explanation.WriteLine(getTypeName());
 }
开发者ID:JamesOakey,项目名称:ERTMSFormalSpecs,代码行数:13,代码来源:Collection.cs


示例19: 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


示例20: 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("STABILIZE ");
     explanation.Write(Expression);
     explanation.Write(" INITIAL_VALUE ");
     explanation.Write(InitialValue);
     explanation.Write(" STOP_CONDITION ");
     explanation.Write(Condition);
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:14,代码来源:StabilizeExpression.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Texture类代码示例发布时间:2022-05-24
下一篇:
C# TextWriter类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap