public void Process(string path, Action <Photo> toolsHandler)
        {
            var photo = new Photo(path);

            var tools = new PhotoTools();

            toolsHandler(photo);
        }
예제 #2
0
        static void Main(string[] args)
        {
            var photoProcessor = new PhotoEditor();

            var tools = new PhotoTools();

            Action <Photo> toolsHandler = tools.SetBrightness;

            toolsHandler += tools.Rotate;
            toolsHandler += tools.Trim;

            photoProcessor.Process("photoPath.jpg", toolsHandler);

            Console.ReadKey();
        }