コード例 #1
0
 /// <summary>
 /// Grabs the enumerable.
 /// </summary>
 /// <typeparam name="T">The type of the query.</typeparam>
 /// <param name="query">The query.</param>
 /// <returns>The result.</returns>
 public static Task <IEnumerable <T> > AsEnumerableAsync <T>(this IRemoteQueryable <T> query)
 {
     Ensure.NotNull(() => query);
     return(ServiceHost.GetService <IRemoteQueryResolver>().AsEnumerableAsync(query as RemoteQuery <T, RemoteQueryProvider <T> >));
 }
コード例 #2
0
 /// <summary>
 /// Grabs the hash set.
 /// </summary>
 /// <typeparam name="T">The type of the query.</typeparam>
 /// <param name="query">The query.</param>
 /// <returns>The result.</returns>
 public static Task <HashSet <T> > ToHashSetAsync <T>(this IRemoteQueryable <T> query)
 {
     Ensure.NotNull(() => query);
     return(ServiceHost.GetService <IRemoteQueryResolver>().ToHashSetAsync(query as RemoteQuery <T, RemoteQueryProvider <T> >));
 }
コード例 #3
0
 /// <summary>
 /// Grabs the hash set.
 /// </summary>
 /// <typeparam name="T">The type of the query.</typeparam>
 /// <param name="query">The query.</param>
 /// <returns>The result.</returns>
 public static Task <HashSet <T> > ToHashSetAsync <T>(this IRemoteQueryable <T> query)
 {
     Ensure.NotNull(() => query);
     return(resolver.Value.ToHashSetAsync(query as RemoteQuery <T, RemoteQueryProvider <T> >));
 }
コード例 #4
0
 /// <summary>
 /// Grabs the enumerable.
 /// </summary>
 /// <typeparam name="T">The type of the query.</typeparam>
 /// <param name="query">The query.</param>
 /// <returns>The result.</returns>
 public static Task <IEnumerable <T> > AsEnumerableAsync <T>(this IRemoteQueryable <T> query)
 {
     Ensure.NotNull(() => query);
     return(resolver.Value.AsEnumerableAsync(query as RemoteQuery <T, RemoteQueryProvider <T> >));
 }
コード例 #5
0
 /// <summary>
 /// Grabs the first item, or the single item, from the result.
 /// </summary>
 /// <typeparam name="T">The type of the query.</typeparam>
 /// <param name="query">The query.</param>
 /// <returns>The result.</returns>
 public static Task <T> FirstOrSingleAsync <T>(this IRemoteQueryable <T> query)
 {
     Ensure.NotNull(() => query);
     return(resolver.Value.FirstOrSingleAsync(query as RemoteQuery <T, RemoteQueryProvider <T> >));
 }