本文整理汇总了C#中TextualExplanation类的典型用法代码示例。如果您正苦于以下问题:C# TextualExplanation类的具体用法?C# TextualExplanation怎么用?C# TextualExplanation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextualExplanation类属于命名空间,在下文中一共展示了TextualExplanation类的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 ");
explanation.Write(ListExpression);
if (Condition != null)
{
explanation.Write(" | ");
explanation.Write(Condition);
}
}
示例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);
}
示例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();
}
});
}
示例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);
}
示例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("}");
}
示例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);
}
示例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();
}
}
}
示例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);
}
});
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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);
}
});
}
示例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);
}
示例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();
}
}
示例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);
}