private static InvocationExpressionSyntax WithExcept(ExpressionSyntax expr, string collectionName) { return(expr .AccessTo("Except") .ToInvocation(collectionName.ToIdentifierName())); }
private static InvocationExpressionSyntax Sum(ExpressionSyntax expr) { return(expr.AccessTo("Sum").ToInvocation()); }
public static ExpressionSyntax AccessTo(this ExpressionSyntax to, string what) { return(to.AccessTo(what.ToIdentifierName())); }
private static InvocationExpressionSyntax GetCast(TypeSyntax type, ExpressionSyntax expression) { return(expression .AccessTo("Cast".MakeGeneric(type)) .ToInvocation()); }