예제 #1
0
 private static InvocationExpressionSyntax WithExcept(ExpressionSyntax expr, string collectionName)
 {
     return(expr
            .AccessTo("Except")
            .ToInvocation(collectionName.ToIdentifierName()));
 }
예제 #2
0
 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()));
 }
예제 #4
0
 private static InvocationExpressionSyntax GetCast(TypeSyntax type, ExpressionSyntax expression)
 {
     return(expression
            .AccessTo("Cast".MakeGeneric(type))
            .ToInvocation());
 }