private async Task LoadStoreProxyFile(String proxyProfileFileToLoad) { // Only use the ReloadSimulatorAsync method when in debug mode #if DEBUG // Load the proxy XML file to use var proxyFilePath = "ms-appx:///WindowsStoreProxy/" + proxyProfileFileToLoad; var baselineStoreProxyFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(proxyFilePath)); // Update the simulator to take its values from those defined in the XML file await CurrentApp.ReloadSimulatorAsync(baselineStoreProxyFile); #endif try { LatestListingInformation = await CurrentApp.LoadListingInformationAsync(); } catch (System.Runtime.InteropServices.COMException comException) { // Happens with E_FAIL throw new InvalidOperationException("App listing request failed with a COM exception.", comException); } catch (ArgumentException argumentException) { // Happens with E_INVALIDARG result throw new InvalidOperationException("App listing request failed with an argument exception.", argumentException); } catch (OutOfMemoryException outOfMemoryException) { // Happens with E_OUTOFMEMORY result throw new InvalidOperationException("App listing request failed with an out of memory exception.", outOfMemoryException); } }
private async void RetriveIAPsListingInformation(Message <ListingInformation> msg) { var listingInformation = await IAPs.LoadListingInformationAsync(); msg.Action.Invoke(listingInformation); }