private static TResult Run <TPixel, TResult>(Image <TPixel> image, Func <Image <TPixel>, TResult> function) where TPixel : unmanaged, IPixel <TPixel> { using (var monitor = new _ImageSharpChangedMonitor(image)) { return(function(image)); } }
private static void Run <TPixel>(Image <TPixel> image, Action <Image <TPixel> > action) where TPixel : unmanaged, IPixel <TPixel> { using (var monitor = new _ImageSharpChangedMonitor(image)) { action(image); } }