64
imageStorage.Store("banner.jpg", new JpgCompressor(), new BlackAndWhiteFilter());
1
using System;
2
3
public interface ICompressor
4
{
5
void Compress(string fileName);
6
}
7
8
public class JpgCompressor: ICompressor
9
{
10
public void Compress(string fileName)
11
{
12
Console.WriteLine("Compressing using JPG");
13
}
14
}
15
16
public class PngCompressor: ICompressor
17
{
18
public void Compress(string fileName)
19
{
20
Console.WriteLine("Compressing using JPG");
21
}
22
}
23
24
public interface IFilter
Cached Result
CAFE at 1 2