예제 #1
0
        /// <summary>
        /// Builds an invocation expression using this expression as target.
        /// </summary>
        public InvocationExpression Invoke(object annotation, string methodName, IEnumerable <AstType> typeArguments, IEnumerable <Expression> arguments)
        {
            InvocationExpression   ie  = new InvocationExpression();
            MemberAccessExpression mre = new MemberAccessExpression();

            mre.Target     = this;
            mre.MemberName = Identifier.Create(TextTokenType.InstanceMethod, methodName);
            mre.TypeArguments.AddRange(typeArguments);
            ie.Target = mre;
            ie.Arguments.AddRange(arguments);
            return(ie);
        }
예제 #2
0
        /// <summary>
        /// Builds an invocation expression using this expression as target.
        /// </summary>
        public InvocationExpression Invoke(string methodName, IEnumerable <AstType> typeArguments, IEnumerable <Expression> arguments)
        {
            InvocationExpression   ie  = new InvocationExpression();
            MemberAccessExpression mre = new MemberAccessExpression();

            mre.Target     = this;
            mre.MemberName = methodName;
            mre.TypeArguments.AddRange(typeArguments);
            ie.Target = mre;
            ie.Arguments.AddRange(arguments);
            return(ie);
        }