コード例 #1
0
        static void Main(string[] args)
        {
            var photo   = new PhotoProcess();
            var filters = new Filters();

            PhotoProcess.PhotoFilterHandler filterHandler = filters.ApplyBrightness;
            filterHandler += filters.ApplyContrast;
            filterHandler += RemoveRedEyes;

            photo.Process("photo.jpg", filterHandler);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: kcrystalchen/CSharpNotes
        // 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;
        }