private void OutputParameters(CodeParameterDeclarationExpressionCollection parameters)
        {
            bool first     = true;
            bool multiline = parameters.Count > ParameterMultilineThreshold;

            if (multiline)
            {
                Indent += 3;
            }
            IEnumerator en = parameters.GetEnumerator();

            while (en.MoveNext())
            {
                CodeParameterDeclarationExpression current = (CodeParameterDeclarationExpression)en.Current;
                if (!first)
                {
                    output.Write(", ");
                }
                else
                {
                    first = false;
                }
                if (multiline)
                {
                    ContinueOnNewLine("");
                }
                GenerateExpression(current);
            }
            if (multiline)
            {
                Indent -= 3;
            }
        }
Example #2
0
        private void ValidateParameters(CodeParameterDeclarationExpressionCollection parameters)
        {
            IEnumerator enumerator = parameters.GetEnumerator();

            while (enumerator.MoveNext())
            {
                CodeParameterDeclarationExpression current = (CodeParameterDeclarationExpression)enumerator.Current;
                this.ValidateParameterDeclarationExpression(current);
            }
        }
 private void OutputParameters(CodeParameterDeclarationExpressionCollection parameters)
 {
     bool first = true;
     bool multiline = parameters.Count > ParameterMultilineThreshold;
     if (multiline)
     {
         Indent += 3;
     }
     IEnumerator en = parameters.GetEnumerator();
     while (en.MoveNext())
     {
         CodeParameterDeclarationExpression current = (CodeParameterDeclarationExpression)en.Current;
         if (first)
         {
             first = false;
         }
         else
         {
             Output.Write(", ");
         }
         if (multiline)
         {
             ContinueOnNewLine("");
         }
         GenerateExpression(current);
     }
     if (multiline)
     {
         Indent -= 3;
     }
 }