コード例 #1
0
        public static MassTransitSettings GetMassTransitSettings(this IConfiguration configuration)
        {
            var options = new MassTransitSettings();
            var configurationSection = configuration.GetSection("MassTransit");

            configurationSection.Bind(options);

            return(options);
        }
コード例 #2
0
        public static MassTransitSettings GetMassTransitSettings(this IServiceCollection services, IConfiguration configuration)
        {
            var options = new MassTransitSettings();

            var configurationSection = configuration.GetSection("MassTransit");

            configurationSection.Bind(options);
            services.Configure <MassTransitSettings>(configurationSection);

            return(options);
        }