public static Task <T> ConcatenateAsync <T>(this IImageProcessor <T> factory, T[,] images, IProgress prog = null) { if (factory is null) { throw new ArgumentNullException(nameof(factory)); } if (images is null) { throw new ArgumentNullException(nameof(images)); } return(Task.Run(() => factory.Concatenate(images, prog))); }