Exemplo n.º 1
0
        public static ToposProducerConfigurer Logging(this ToposProducerConfigurer 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 ToposProducerConfigurer Serialization(this ToposProducerConfigurer 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);
        }