Пример #1
0
        static void Main(string[] args)
        {
            var contentMonitor = new ContentMonitor();

            IFilter customFilter = new CustomFilter();

            contentMonitor.Monitor(customFilter);


            var     thirdPartyFilter        = new ThirdPartyFilter();
            IFilter thirdPartyFilterAdapter = new ThirdPartyFilterAdapter(thirdPartyFilter);

            contentMonitor.Monitor(thirdPartyFilterAdapter);

            Console.ReadKey();
        }
Пример #2
0
 public ThirdPartyFilterAdapter(ThirdPartyFilter thirdPartyFilter)
 {
     _thirdPartyFilter = thirdPartyFilter;
 }