/// <summary>
 /// Replaces method calls with lambda expressions.
 /// </summary>
 /// <typeparam name="T">The type of the query data.</typeparam>
 /// <param name="value">A query.</param>
 /// <param name="whitelist">A list of types to inject, whether marked as injectable or not.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedAsyncQueryable <T> ToInjectable <T>(this IOrderedAsyncQueryable <T> value, params Type[] whitelist)
 {
     return(value.Rewrite(new InjectableQueryRewriter(whitelist)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Replaces methods of type <c>from</c> with methods of type <c>to</c>.
 /// </summary>
 /// <typeparam name="T">The type of the query data.</typeparam>
 /// <param name="value">A query.</param>
 /// <param name="from">A type to replace.</param>
 /// <param name="to">A type to use instead.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedAsyncQueryable <T> ToSubstitution <T>(this IOrderedAsyncQueryable <T> value, Type from, Type to)
 {
     return(value.Rewrite(new SubstitutionQueryRewriter(from, to)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Makes a query null-safe.
 /// </summary>
 /// <typeparam name="T">The type of the query data.</typeparam>
 /// <param name="value">A query.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedAsyncQueryable <T> ToNullsafe <T>(this IOrderedAsyncQueryable <T> value)
 {
     return(value.Rewrite(new NullsafeQueryRewriter()));
 }