diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2017-04-25 12:16:25 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-04-25 19:16:25 +0100 |
commit | cdc405512844671bc3b2c8bd28f583036e5530a2 (patch) | |
tree | 881d68b4a26eecbbc77e76b86b3f322cd41b3e3d /Xamarin.Forms.Core | |
parent | 9631ec2d8bbac8b837955af238f322c1023af097 (diff) | |
download | xamarin-forms-cdc405512844671bc3b2c8bd28f583036e5530a2.tar.gz xamarin-forms-cdc405512844671bc3b2c8bd28f583036e5530a2.tar.bz2 xamarin-forms-cdc405512844671bc3b2c8bd28f583036e5530a2.zip |
Better error handling for image loading errors on iOS/Android (#849)
* First run at removing async void image update methods
Consistent error logging and IsLoading on Android,iOS,UWP
Move error logging into image handlers for better messages
Add demo of custom ImageRenderer error handling
Update docs
Make the test smaller so the results don't get pushed offscreen
Fix namespace error
* Update error handling for fast image renderer
* Update 37625 test to use image we control
* Add java disposed check to avoid ObjectDisposedException in async operations
* Add disposed checks to legacy renderer; null check element before SetIsLoading
* Check disposed on GetDesiredSize for fast renderer
Use local disposed member where possible for disposed check
* Check for disposal after async handlers in iOS
* Add disposal checks after async methods in Windows
* Reset linker settings on project; reduce redundant casts in ImageViewExtensions
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/FileImageSource.cs | 5 | ||||
-rw-r--r-- | Xamarin.Forms.Core/UriImageSource.cs | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/FileImageSource.cs b/Xamarin.Forms.Core/FileImageSource.cs index 9e1d1e73..f2f34719 100644 --- a/Xamarin.Forms.Core/FileImageSource.cs +++ b/Xamarin.Forms.Core/FileImageSource.cs @@ -18,6 +18,11 @@ namespace Xamarin.Forms return Task.FromResult(false); } + public override string ToString() + { + return $"File: {File}"; + } + public static implicit operator FileImageSource(string file) { return (FileImageSource)FromFile(file); diff --git a/Xamarin.Forms.Core/UriImageSource.cs b/Xamarin.Forms.Core/UriImageSource.cs index 7d1a9eb2..5e0db2cb 100644 --- a/Xamarin.Forms.Core/UriImageSource.cs +++ b/Xamarin.Forms.Core/UriImageSource.cs @@ -92,6 +92,11 @@ namespace Xamarin.Forms return stream; } + public override string ToString() + { + return $"Uri: {Uri}"; + } + static string GetCacheKey(Uri uri) { return Device.PlatformServices.GetMD5Hash(uri.AbsoluteUri); |