public ToposConsumerConfigurer(Action <StandardConfigurer <IConsumerImplementation> > configure, string groupName)
        {
            var configurer = StandardConfigurer <IConsumerImplementation> .New(_injectionist);

            _injectionist.Register(c => new GroupId(groupName));

            configure(configurer);
        }
        public ToposProducerConfigurer(Action <StandardConfigurer <IProducerImplementation> > configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }
            var configurer = StandardConfigurer <IProducerImplementation> .New(_injectionist);

            configure(configurer);
        }
        public ToposConsumerConfigurer Positions(Action <StandardConfigurer <IPositionManager> > configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }
            var configurer = StandardConfigurer <IPositionManager> .New(_injectionist);

            configure(configurer);

            return(this);
        }
Esempio n. 4
0
        public static ToposConsumerConfigurer Logging(this ToposConsumerConfigurer configurer, Action <StandardConfigurer <ILoggerFactory> > configure)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException(nameof(configurer));
            }
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }
            var standardConfigurer = StandardConfigurer <ILoggerFactory> .New(configurer);

            configure(standardConfigurer);
            return(configurer);
        }
        public static ToposConsumerConfigurer Serialization(this ToposConsumerConfigurer configurer, Action <StandardConfigurer <IMessageSerializer> > configure)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException(nameof(configurer));
            }
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }
            var standardConfigurer = StandardConfigurer <IMessageSerializer> .New(configurer);

            configure(standardConfigurer);
            return(configurer);
        }