Esempio n. 1
0
        public PubSubMapperForSyntaxExtension PublishEventTo(string section)
        {
            var parameter = new PubSubConfiguration();

            _configuration.GetSection(section).Bind(parameter);
            SetDefaultValue(parameter);

            return(new PubSubMapperForSyntaxExtension(_services, _configuration, parameter));
        }
Esempio n. 2
0
        public PubSubMapperForSyntaxExtension PublishEventTo(Action <PubSubConfiguration> options)
        {
            var parameter = new PubSubConfiguration();

            options.Invoke(parameter);
            SetDefaultValue(parameter);

            return(new PubSubMapperForSyntaxExtension(_services, _configuration, parameter));
        }
 public PubSubMapperForSyntaxExtension(IServiceCollection services, IConfiguration configuration, PubSubConfiguration pubSubConfiguration)
 {
     _services            = services;
     _pubSubConfiguration = pubSubConfiguration;
     _configuration       = configuration;
 }