Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 耐用产品在应用程序购买wp8中不可见_C#_Windows Phone 8 - Fatal编程技术网

C# 耐用产品在应用程序购买wp8中不可见

C# 耐用产品在应用程序购买wp8中不可见,c#,windows-phone-8,C#,Windows Phone 8,在我的应用程序中,我无法在Wp 8中获取“耐用”产品列表信息。使用相同的代码行,我得到消耗品清单 ListingInformation li = await CurrentApp.LoadListingInformationAsync(); var len = li.ProductListings.Count; System.Diagnostics.Debug.WriteLine("Count: " + len); //var value = li.ProductListings.Values;

在我的应用程序中,我无法在Wp 8中获取“耐用”产品列表信息。使用相同的代码行,我得到消耗品清单

ListingInformation li = await CurrentApp.LoadListingInformationAsync();
var len = li.ProductListings.Count;
System.Diagnostics.Debug.WriteLine("Count: " + len);
//var value = li.ProductListings.Values;
foreach(string key in li.ProductListings.Keys) {
    ProductListing pListing = li.ProductListings[key];
    System.Diagnostics.Debug.WriteLine(key);
    string status = Store.CurrentApp.LicenseInformation.ProductLicenses[key].IsActive ? "Purchased" : pListing.FormattedPrice;
}

我在哪里犯错?请帮忙…

我有问题了。这是操作系统的问题。在WP8中,如果持久产品许可证期限为“永久”,则当调用“CurrentApp.LoadListingInformationAsync()”方法时,产品将出现在产品列表中。如果许可证期限为1天、2天等,则不返回任何内容。它将在WP8.1中正常工作。