【发布时间】:2015-02-01 05:56:02
【问题描述】:
我有 Windows phone 8.0 c# 应用程序。有许多与此应用程序相关的应用内耐用产品(大约 2000 个)。应用程序已发布,可以在应用商店购买与该应用程序相关的任何耐用产品。它工作正常。
我想刷新应用程序中的所有产品价格并显示实际价格列表(从应用商店加载)。
我使用这个代码:
var asyncListingInformation = CurrentApp.LoadListingInformationAsync();
asyncListingInformation.Completed = (async, status) =>
{
try
{
var listingInformation = async.GetResults();
int count = 0; // Compute count of returned products
foreach (var pair in listingInformation.ProductListings)
{
string productId = pair.Value.ProductId;
string price = pair.Value.FormattedPrice;
this.UpdateProductPrice(productId, price);
count++;
}
Debug.WriteLine(count); // Returns: 100
}
catch (Exception e)
{
}
};
问题是listingInformation.ProductListings 只包含100 个产品,但服务器上的产品要多得多。 我无法检索超过 100 个产品的问题在哪里?有没有其他方法可以从应用商店加载指定产品的价格?应用程序知道所有产品 ID。
【问题讨论】:
标签: c# windows-phone-8