예제 #1
0
        public static void doMoreWork()
        {
            PhotoProcessor pp = new PhotoProcessor();

            PhotoProcessor.ConsoleDelegate conDel = DelegateMethod;
            var conDel2 = new PhotoProcessor.ConsoleDelegate(DelegateMethod);

            conDel("writing to console from a delegate");
            conDel2("writing some more");
        }
예제 #2
0
        private static void doWorkWithAction()
        {
            var            processor      = new PhotoProcessor();
            var            filters        = new PhotoFilters();
            Action <Photo> photoProcessor = filters.ResizePhoto;

            PhotoProcessorDelMain pd = new PhotoProcessorDelMain(filters.AdjustColour);

            processor.ProcessWithAction("photo.jpg", photoProcessor);
            Console.ReadLine();
        }
예제 #3
0
        private static void doWork()
        {
            var processor = new PhotoProcessor();
            var filters   = new PhotoFilters();

            PhotoProcessor.PhotoProcessorHandler photoProcessor = filters.ResizePhoto;

            //PhotoProcessorDelMain pd = new PhotoProcessorDelMain(filters.AdjustColour);

            processor.Process("photo.jpg", photoProcessor);
            Console.ReadLine();
        }