GetArgument() публичный Метод

Gets the argument expression with the specified index.
public GetArgument ( int index ) : Expression
index int The index of the argument expression to get.
Результат Expression
Пример #1
0
        protected internal override Expression VisitNew(NewExpression node)
        {
            Out("new ");
            Out(node.Type.Name);
            Out('(');
            var members = node.Members;

            for (var i = 0; i < node.ArgumentCount; i++)
            {
                if (i > 0)
                {
                    Out(", ");
                }

                if (members != null)
                {
                    var name = members[i].Name;
                    Out(name);
                    Out(" = ");
                }

                Visit(node.GetArgument(i));
            }

            Out(')');
            return(node);
        }
Пример #2
0
 protected internal override Expression VisitNew(NewExpression node)
 {
     Out("new ");
     Out(node.Type.Name);
     Out('(');
     Collections.ObjectModel.ReadOnlyCollection <MemberInfo> members = node.Members;
     for (int i = 0; i < node.ArgumentCount; i++)
     {
         if (i > 0)
         {
             Out(", ");
         }
         if (members != null)
         {
             string name = members[i].Name;
             Out(name);
             Out(" = ");
         }
         Visit(node.GetArgument(i));
     }
     Out(')');
     return(node);
 }