public static void Test(IFilter filter, string input, string output) { Bitmap bitmap = new Bitmap(input); bitmap = filter.ApplyTo(bitmap); bitmap.Save(output); }
public static IEnumerable <T> ApplyTo <T>(this IFilter <T> me, IEnumerable <T> source) => me.ApplyTo(source.AsQueryable());
public static IQueryable <T> ApplyTo <T>(this IFilter <T> me, Func <IQueryable <T> > source) => me.ApplyTo(source());
public static IQueryable <T> Filter <T> (this IQueryable <T> source, [NotNull] IFilter <T>?filter) { ThrowHelper.ThrowIfIsNull(filter, nameof(filter)); return(filter.ApplyTo(source)); }
public static Bitmap Apply(this SmartBitmap image, IFilter filter) { return filter.ApplyTo(image); }