Example #1
0
        private static async Task <StorageFile> GetFileFromApplicationUriAsyncTask(CancellationToken ct, Uri uri)
        {
            if (uri.Scheme != "ms-appx")
            {
                throw new InvalidOperationException("Uri is not using the ms-appx scheme");
            }

            var path = uri.PathAndQuery;

            return(await StorageFile.GetFileFromPathAsync(await AssetsManager.DownloadAsset(ct, path)));
        }