Action RenderOnce(Action action) { var context = new RenderOnlyOnce(); Action ret = () => { if (false == context.AlreadyCalled) { action(); context.AlreadyCalled = true; } }; return(ret); }
Action RenderOnce(Action action) { var context = new RenderOnlyOnce(); Action ret = () => { if (false == context.AlreadyCalled) { action(); context.AlreadyCalled = true; } }; return ret; }