예제 #1
0
        /// <summary>
        /// Wraps all of the specified handler's event handling methods in a proxy delegate.
        /// </summary>
        /// <param name="eventHandler">The event handler.</param>
        /// <param name="proxy">The proxy.</param>
        /// <returns>A proxy for the specified event handler.</returns>
        public static IEventHandler WrapAll(
            this object eventHandler,
            Handle <IEvent> proxy)
        {
            var compositeProjector = new EventHandlerWrapper(eventHandler);

            compositeProjector.WrapAll(proxy);

            return(compositeProjector);
        }
예제 #2
0
        public static IEventHandler WrapAll(
            this object eventHandler,
            Handle <IEvent> proxy,
            string aliasForCatchup = null)
        {
            var compositeProjector = new EventHandlerWrapper(eventHandler);

            compositeProjector.WrapAll(proxy);

            return(compositeProjector);
        }