本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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(" )");
}
}
}
示例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);
}
示例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");
}
示例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");
}
}
示例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();
}
}
示例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);
}
示例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);
}
示例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 ");
}
示例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);
}
}
示例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());
}
示例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);
}