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

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

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

        configure(configurer);
    }
Example #3
0
    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);
    }
    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);
    }
Example #5
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);
    }