/// <summary> /// Loads the image into given imageView using defined parameters. /// IMPORTANT: It throws image loading exceptions - you should handle them /// </summary> /// <returns>An awaitable Task.</returns> /// <param name="parameters">Parameters for loading the image.</param> /// <param name="imageView">Image view that should receive the image.</param> /// <param name="imageScale">Optional scale factor to use when interpreting the image data. If unspecified it will use the device scale (ie: Retina = 2, non retina = 1)</param> public static Task <IScheduledWork> IntoAsync(this TaskParameter parameters, PImageView imageView, float imageScale = -1f) { return(parameters.IntoAsync(param => param.Into(imageView, imageScale))); }
/// <summary> /// Loads the image into given imageView using defined parameters. /// </summary> /// <param name="parameters">Parameters for loading the image.</param> /// <param name="imageView">Image view that should receive the image.</param> /// <param name="imageScale">Optional scale factor to use when interpreting the image data. If unspecified it will use the device scale (ie: Retina = 2, non retina = 1)</param> public static IScheduledWork Into(this TaskParameter parameters, PImageView imageView, float imageScale = -1f) { var target = new PImageViewTarget(imageView); return(parameters.Into(imageScale, target)); }