Esempio n. 1
0
        public async Task <IRandomAccessStream> GetResourceStreamHelperAsync(AdaptiveCardGetResourceStreamArgs args)
        {
            // We expect something like "symbol:up", and then map "up" to the file name
            StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/Symbols/{args.Url.AbsolutePath}.png"));

            return(await file.OpenAsync(FileAccessMode.Read));
        }
Esempio n. 2
0
 public IAsyncOperation <IRandomAccessStream> GetResourceStreamAsync(AdaptiveCardGetResourceStreamArgs args)
 {
     return(GetResourceStreamHelperAsync(args).AsAsyncOperation());
 }