/// <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> ToAsyncNullsafe <T>(this IOrderedAsyncQueryable <T> value)
 {
     return(value.AsyncRewrite(new NullsafeQueryRewriter()));
 }
 /// <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> ToAsyncInjectable <T>(this IOrderedAsyncQueryable <T> value, params Type[] whitelist)
 {
     return(value.AsyncRewrite(new InjectableQueryRewriter(whitelist)));
 }
Exemplo n.º 3
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> ToAsyncSubstitution <T>(this IOrderedAsyncQueryable <T> value, Type from, Type to)
 {
     return(value.AsyncRewrite(new SubstitutionQueryRewriter(from, to)));
 }
 /// <summary>
 /// Replaces methods of type <c>from</c> with methods of type <c>to</c>.
 /// </summary>
 /// <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 ToAsyncSubstitution(this IOrderedAsyncQueryable value, Type from, Type to)
 => value.AsyncRewrite(new SubstitutionQueryRewriter(from, to));
Exemplo n.º 5
0
 /// <summary>
 /// Makes a query null-safe.
 /// </summary>
 /// <param name="value">A query.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedAsyncQueryable ToAsyncNullsafe(this IOrderedAsyncQueryable value)
 => value.AsyncRewrite(new NullsafeQueryRewriter());
 /// <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="greenlist">A list of types to inject, whether marked as injectable or not.</param>
 /// <returns>A query proxy.</returns>
 public static IOrderedAsyncQueryable <T> ToAsyncInjectable <T>(this IOrderedAsyncQueryable <T> value, params Type[] greenlist)
 => value.AsyncRewrite(new InjectableQueryRewriter(greenlist));