Ejemplo n.º 1
0
        public static Deferrer WithLock(EventHandler handler)
        {
            var deferrer = new Deferrer();

            deferrer.Locking += handler;

            return(deferrer);
        }
Ejemplo n.º 2
0
        public static Deferrer WithFree(EventHandler handler)
        {
            var deferrer = new Deferrer();

            deferrer.Freeing += handler;

            return(deferrer);
        }
Ejemplo n.º 3
0
        public static Deferrer WithBoth(EventHandler lockHandler, EventHandler freeHandler)
        {
            var deferrer = new Deferrer();

            deferrer.Locking += lockHandler;
            deferrer.Freeing += freeHandler;

            return(deferrer);
        }