Пример #1
0
        public static ConsumerSubscriptionConfigurator <TConsumer> Consumer <TConsumer>(
            this SubscriptionBusServiceConfigurator configurator, IUnityContainer container)
            where TConsumer : class, IConsumer
        {
            var consumerFactory = new UnityConsumerFactory <TConsumer>(container);

            return(configurator.Consumer(consumerFactory));
        }
Пример #2
0
        public static void Consumer <T>(this IReceiveEndpointConfigurator configurator, IUnityContainer container,
                                        Action <IConsumerConfigurator <T> > configure = null)
            where T : class, IConsumer
        {
            var consumerFactory = new UnityConsumerFactory <T>(container);

            configurator.Consumer(consumerFactory, configure);
        }