示例#1
0
        public BodyBuilder AddVoidMemberInvocation(
            IdentifierNameSyntax objectName,
            IdentifierNameSyntax methodName,
            params ArgumentSyntax[] arguments)
        {
            var methodAccess = SF.MemberAccessExpression(
                SyntaxKind.SimpleMemberAccessExpression,
                objectName, methodName);

            AddExpression(
                SF.InvocationExpression(
                    methodAccess,
                    ToArgList(arguments)));

            return(this);
        }
示例#2
0
 public static ExpressionSyntax Call(this ExpressionSyntax expression, SimpleNameSyntax instruction, params ExpressionSyntax[] arguments)
 {
     return(SF.InvocationExpression(expression.Dot(instruction), SF.ArgumentList(SF.SeparatedList(
                                                                                     arguments.Select(x => SF.Argument(x))))));
 }
示例#3
0
 public static ExpressionSyntax Call(this ExpressionSyntax expression, string instruction, IEnumerable <ExpressionSyntax> arguments)
 {
     return(SF.InvocationExpression(expression.Dot(instruction), SF.ArgumentList(SF.SeparatedList(
                                                                                     arguments.Select(x => SF.Argument(x))))));
 }
示例#4
0
 public static ExpressionSyntax Invoke(this ExpressionSyntax expression, params ExpressionSyntax[] arguments)
 {
     return(SF.InvocationExpression(expression, SF.ArgumentList(SF.SeparatedList(
                                                                    arguments.Select(x => SF.Argument(x))))));
 }