本文整理汇总了C#中System.CodeDom.CodeExpressionCollection.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# CodeExpressionCollection.GetEnumerator方法的具体用法?C# CodeExpressionCollection.GetEnumerator怎么用?C# CodeExpressionCollection.GetEnumerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.CodeDom.CodeExpressionCollection
的用法示例。
在下文中一共展示了CodeExpressionCollection.GetEnumerator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OutputExpressionList
protected virtual void OutputExpressionList (CodeExpressionCollection expressions,
bool newLineBetweenItems)
{
++Indent;
IEnumerator enumerator = expressions.GetEnumerator();
if (enumerator.MoveNext()) {
CodeExpression expression = (CodeExpression)enumerator.Current;
GenerateExpression (expression);
while (enumerator.MoveNext()) {
expression = (CodeExpression)enumerator.Current;
output.Write (',');
if (newLineBetweenItems)
output.WriteLine ();
else
output.Write (' ');
GenerateExpression (expression);
}
}
--Indent;
}
示例2: OutputExpressionList
/// <devdoc>
/// <para>
/// Generates code for the specified expression list.
/// </para>
/// </devdoc>
private void OutputExpressionList(CodeExpressionCollection expressions, bool newlineBetweenItems) {
bool first = true;
IEnumerator en = expressions.GetEnumerator();
Indent++;
while (en.MoveNext()) {
if (first) {
first = false;
}
else {
if (newlineBetweenItems)
ContinueOnNewLine(",");
else
Output.Write(", ");
}
((ICodeGenerator)this).GenerateCodeFromExpression((CodeExpression)en.Current, output.InnerWriter, options);
}
Indent--;
}
示例3: OutputExpressionList
private void OutputExpressionList(CodeExpressionCollection expressions, bool newlineBetweenItems)
{
bool flag1 = true;
IEnumerator enumerator1 = expressions.GetEnumerator();
this.Indent++;
while (enumerator1.MoveNext())
{
if (flag1)
{
flag1 = false;
}
else if (newlineBetweenItems)
{
this.ContinueOnNewLine(",");
}
else
{
this.Output.Write(", ");
}
((ICodeGenerator)this).GenerateCodeFromExpression((CodeExpression)enumerator1.Current, this.output.InnerWriter, this.options);
}
this.Indent--;
}
示例4: ValidateExpressionList
private void ValidateExpressionList(CodeExpressionCollection expressions) {
IEnumerator en = expressions.GetEnumerator();
while (en.MoveNext()) {
ValidateExpression((CodeExpression)en.Current);
}
}
示例5: OutputExpressionList
protected override void OutputExpressionList(CodeExpressionCollection expressions, bool newlineBetweenItems)
{
bool first = true;
IEnumerator en = expressions.GetEnumerator();
Indent++;
while (en.MoveNext()) {
if (first) {
first = false;
} else {
if (newlineBetweenItems) ContinueOnNewLine(",");
else Write(", ");
}
GenerateExpression((CodeExpression)en.Current);
}
Indent--;
}