private static InvocationExpressionSyntax AnonymousProperty(ExpressionSyntax expr, PropertyInfo pi, HashSet <string> usings) { var args = new ArgumentSyntax[] { Argument(expr), Argument(LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(pi.Name))) }; //Prop<{pi.PropertyType}>({expr},{pi.Name}) return(InvocationExpression( GenericName( Identifier("Prop")) .WithTypeArgumentList( TypeArgumentList( SingletonSeparatedList <TypeSyntax>(pi.PropertyType.TypeName(usings))))) .WithArgumentList( ArgumentList(SeparatedList <ArgumentSyntax>(args.ComaSeparated())))); }