diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-07-18 17:16:47 -0600 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-07-18 16:16:47 -0700 |
commit | 272033723ea275ceb8a288fa605eafd035c79f2d (patch) | |
tree | abc639d0f5627f3877f9e237e473bda168e9e030 /Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs | |
parent | c9da550ce4987e01c1bbce9d0a17b860e1d300b3 (diff) | |
download | xamarin-forms-272033723ea275ceb8a288fa605eafd035c79f2d.tar.gz xamarin-forms-272033723ea275ceb8a288fa605eafd035c79f2d.tar.bz2 xamarin-forms-272033723ea275ceb8a288fa605eafd035c79f2d.zip |
Windows image loader error handling (#260)
* Repros for various image issues
* Log image loading errors
* Better repro instructions and user interface
* Image loading tests now running on WinRT/UWP phone/tablet/desktop
* Move FailImageSource into shared project
* Move FailImageSource into shared project
* Update docs
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs b/Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs new file mode 100644 index 00000000..ffe999ee --- /dev/null +++ b/Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading; +using System.Threading.Tasks; + +using WImageSource = Windows.UI.Xaml.Media.ImageSource; + +#if WINDOWS_UWP +using Xamarin.Forms.Platform.UWP; + +namespace Xamarin.Forms.ControlGallery.WindowsUniversal +#else +using Xamarin.Forms.Platform.WinRT; + +namespace Xamarin.Forms.ControlGallery.WinRT +#endif +{ + public sealed class BrokenImageSourceHandler : IImageSourceHandler + { + public Task<WImageSource> LoadImageAsync(ImageSource imagesource, CancellationToken cancellationToken = new CancellationToken()) + { + throw new Exception("Fail"); + } + } +}
\ No newline at end of file |