async void OnSourcePropertyChanging(ImageSource oldvalue, ImageSource newvalue) { if (oldvalue == null) { return; } oldvalue.SourceChanged -= OnSourceChanged; await oldvalue.Cancel(); }
async static void CancelOldValue(ImageSource oldvalue) { try { await oldvalue.Cancel(); } catch (ObjectDisposedException) { // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792 } }
public ImageCell() { Disappearing += (sender, e) => { if (ImageSource == null) { return; } ImageSource.Cancel(); }; }
public static async void ImageSourceChanging(ImageSource oldImageSource) { if (oldImageSource == null) { return; } try { await oldImageSource.Cancel().ConfigureAwait(false); } catch (ObjectDisposedException) { // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792 } }
async void OnSourcePropertyChanging(ImageSource oldvalue, ImageSource newvalue) { if (oldvalue == null) { return; } oldvalue.SourceChanged -= OnSourceChanged; try { await oldvalue.Cancel(); } catch (ObjectDisposedException) { // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792 } }