Exemplo n.º 1
0
        public static void Test(IFilter filter, string input, string output)
        {
            Bitmap bitmap = new Bitmap(input);

            bitmap = filter.ApplyTo(bitmap);

            bitmap.Save(output);
        }
Exemplo n.º 2
0
 public static IEnumerable <T> ApplyTo <T>(this IFilter <T> me, IEnumerable <T> source)
 => me.ApplyTo(source.AsQueryable());
Exemplo n.º 3
0
 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));
        }
Exemplo n.º 5
0
 public static Bitmap Apply(this SmartBitmap image, IFilter filter)
 {
     return filter.ApplyTo(image);
 }