// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Tests { using System; using ImageSharp.PixelFormats; /// /// Provides instances for parametric unit tests. /// /// The pixel format of the image public abstract partial class TestImageProvider where TPixel : struct, IPixel { private class LambdaProvider : TestImageProvider { private readonly Func> factoryFunc; public LambdaProvider(Func> factoryFunc) { this.factoryFunc = factoryFunc; } public override Image GetImage() => this.factoryFunc(); } } }