Ejemplo n.º 1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='phrase'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Grocery> > SearchAsync(this IGroceryOperations operations, string phrase, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SearchWithHttpMessagesAsync(phrase, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Grocery> > GetAllAsync(this IGroceryOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='phrase'>
 /// </param>
 public static IList <Grocery> Search(this IGroceryOperations operations, string phrase)
 {
     return(operations.SearchAsync(phrase).GetAwaiter().GetResult());
 }
Ejemplo n.º 4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <Grocery> GetAll(this IGroceryOperations operations)
 {
     return(operations.GetAllAsync().GetAwaiter().GetResult());
 }