本文整理汇总了C#中RenderContext.Append方法的典型用法代码示例。如果您正苦于以下问题:C# RenderContext.Append方法的具体用法?C# RenderContext.Append怎么用?C# RenderContext.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderContext
的用法示例。
在下文中一共展示了RenderContext.Append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public override bool Render(RenderContext dest)
{
dest.Append("while(");
Condition.Render(dest);
dest.Append(")");
return Code.RenderIndented(dest);
}
示例2: Render
public override bool Render(RenderContext dest)
{
dest.Append("with(");
Expression.Render(dest);
dest.Append(")");
return Code.RenderIndented(dest);
}
示例3: Render
public override bool Render(RenderContext dest)
{
dest.Append("(");
Inner.Render(dest);
dest.Append(")");
return true;
}
示例4: Render
public override bool Render(RenderContext dest)
{
dest.DisableLineBreaks();
dest.Append(Label);
dest.Append(':');
dest.EnableLineBreaks();
return false;
}
示例5: Render
public override bool Render(RenderContext dest)
{
WrapAndRender(dest, Condition, false);
dest.Append('?');
WrapAndRender(dest, TrueResult, false);
dest.Append(':');
WrapAndRender(dest, FalseResult, false);
return true;
}
示例6: Render
public override bool Render(RenderContext dest)
{
// Render the statement, need special handling to insert
// a space if don't have a braced statement block
dest.Append("do");
if (Code.RenderIndented(dest))
dest.Append(';');
dest.StartLine();
dest.Append("while(");
Condition.Render(dest);
dest.Append(')');
return false;
}
示例7: Render
public override bool Render(RenderContext dest)
{
if (Value == null)
{
dest.Append(Op.ToString().Substring(3));
return true;
}
dest.DisableLineBreaks();
dest.Append(Op.ToString().Substring(3));
dest.EnableLineBreaksAfterNextWrite();
Value.Render(dest);
return true;
}
示例8: Render
public override bool Render(RenderContext dest)
{
if (Op == Token.kw_fallthrough)
return false;
dest.DisableLineBreaks();
dest.Append(Op.ToString().Substring(3));
if (Label != null)
{
dest.Append(Label);
}
dest.EnableLineBreaks();
return true;
}
示例9: Render
public override bool Render(RenderContext dest)
{
WrapAndRender(dest, Lhs, false);
dest.Append("(");
bool first = true;
foreach (var a in Arguments)
{
if (!first)
dest.Append(",");
a.Render(dest);
first = false;
}
dest.Append(")");
return true;
}
示例10: Render
public override bool Render(RenderContext dest)
{
dest.ForceLineBreak();
dest.Append(Comment);
dest.ForceLineBreak();
return false;
}
示例11: Render
public override bool Render(RenderContext dest)
{
dest.Append('[');
bool bFirst = true;
foreach (var e in Values)
{
if (!bFirst)
dest.Append(",");
else
bFirst = false;
if (e!=null)
WrapAndRender(dest, e, false);
}
dest.Append(']');
return true;
}
示例12: Render
public override bool Render(RenderContext dest)
{
WrapAndRender(dest, Lhs, false);
string str = GetIdentifier();
if (str != null)
{
dest.Append('.');
dest.Append(str);
}
else
{
dest.Append("[");
Index.Render(dest);
dest.Append("]");
}
return true;
}
示例13: Render
public override bool Render(RenderContext dest)
{
for (int i = 0; i < Expressions.Count; i++)
{
if (i > 0)
dest.Append(',');
WrapAndRender(dest, Expressions[i], false);
}
return true;
}
示例14: Render
public override bool Render(RenderContext dest)
{
if (Values.Count == 0)
{
dest.Append("{}");
return true;
}
dest.Append('{');
dest.Indent();
for (var i = 0; i < Values.Count; i++)
{
if (i > 0)
dest.Append(',');
dest.StartLine();
// Key - if key is a valid identifier, don't quote it
var kp = Values[i];
if (kp.Key.GetType() == typeof(ast.ExprNodeIdentifier))
{
dest.Append(dest.Members.GetObfuscatedSymbol(((ast.ExprNodeIdentifier)kp.Key).Name));
}
else if (kp.Key.GetType() == typeof(String) && Tokenizer.IsIdentifier((string)kp.Key) && !Tokenizer.IsKeyword((string)kp.Key))
{
dest.Append((string)kp.Key);
}
else
{
ExprNodeLiteral.RenderValue(dest, kp.Key);
}
// Value
dest.Append(':');
kp.Value.Render(dest);
}
dest.Unindent();
dest.StartLine();
dest.Append('}');
return true;
}
示例15: Render
public override bool Render(RenderContext dest)
{
dest.Append("for(");
if (VariableDeclaration!=null)
VariableDeclaration.Render(dest);
else
Iterator.Render(dest);
dest.Append("in");
Collection.Render(dest);
dest.Append(")");
return Code.RenderIndented(dest);
}