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

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

            return ret;
        }