/// <summary> /// Returns a list of Product objects that describe the products (including current price) associated with the specified list of Purchasables. /// </summary> /// <param name="purchasables">A list of Purchasable objects that identify the products to be returned.</param> /// <returns>The list of Product objects.</returns> public async Task <IList <Product> > RequestProductListAsync(IList <Purchasable> purchasables) { var tcs = new TaskCompletionSource <IList <Product> >(); var listener = new ProductListListener(tcs); RequestProductList(purchasables, listener); return(await tcs.Task.TimeoutAfter(timeout)); }
/// <summary> /// Returns a list of Product objects that describe the products (including current price) associated with the specified list of Purchasables. /// </summary> /// <param name="purchasables">A list of Purchasable objects that identify the products to be returned.</param> /// <returns>The list of Product objects.</returns> public async Task<IList<Product>> RequestProductListAsync(IList<Purchasable> purchasables) { var tcs = new TaskCompletionSource<IList<Product>>(); var listener = new ProductListListener(tcs); RequestProductList(purchasables, listener); return await tcs.Task.TimeoutAfter(timeout); }