/// <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); } }
/// <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); } }
/// <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()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <Grocery> GetAll(this IGroceryOperations operations) { return(operations.GetAllAsync().GetAwaiter().GetResult()); }