Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var            processor     = new PhotoProcess();
            var            filters       = new PhotoFilters();
            Action <Photo> filterHandler = filters.ApplyBrightness;

            filterHandler += filters.ApplyContrast;
            filterHandler += filters.RemoveRedEye;

            processor.Process("photo.jpg", filterHandler);
        }
Exemplo n.º 2
0
        // design a framework to process the photos
        static void Main(string[] args)
        {
            PhotoProcess photoProcess = new PhotoProcess();

            PhotoFilters photoFilters = new PhotoFilters();

            PhotoProcess.PhotoFilterHandler photoFilterHandler0 = photoFilters.ApplyBrightness;
            photoFilterHandler0 += photoFilters.ApplyContrast;
            photoFilterHandler0 += photoFilters.Resize;
            photoFilterHandler0 += RemoveRedEyeFilter;

            photoProcess.Process("Process Path.jpg", photoFilterHandler0);



            PhotoProcessorAction photoProcessorAction = new PhotoProcessorAction();

            Action <Photo> photoFilterHandler = photoFilters.ApplyContrast;
        }