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"); }
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(); }
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(); }