/// <summary> /// Initialize the Nuke library. /// </summary> /// <param name="debug">A flag indicating if Debug logging is enabled</param> /// <param name="disableFileImageSourceHandling">If set to true, the processing of FileImageSource will be delegated to the default Xamarin.Forms file image handler.</param> public static void Init(bool debug = false, bool disableFileImageSourceHandling = false) { IsDebugEnabled = debug; DisableFileImageSourceHandling = disableFileImageSourceHandling; NukeHelper.Preserve(); Console.WriteLine(GetLogPrefix(DebugSeverity) + $"Initializing Xamarin.Forms.Nuke with {{ debug: {debug}, disableFileImageSourceHandling: {disableFileImageSourceHandling} }}"); }
public Task <UIImage> LoadImageAsync( ImageSource imageSource, CancellationToken cancellationToken = new CancellationToken(), float scale = 1) { return(NukeHelper.LoadViaNuke( imageSource, cancellationToken)); }
public async Task <UIImage> LoadImageAsync( ImageSource imageSource, CancellationToken cancellationToken = new CancellationToken(), float scale = 1) { var result = await NukeHelper.LoadViaNuke(imageSource, cancellationToken, scale); if (result == null) { result = await LoadPlaceholderAsync(); } return(result); }