public static IWebJobsBuilder AddRabbitMQ()

in extension/WebJobs.Extensions.RabbitMQ/Config/RabbitMQWebJobsBuilderExtensions.cs [21:38]


    public static IWebJobsBuilder AddRabbitMQ(this IWebJobsBuilder builder)
    {
        if (builder == null)
        {
            throw new ArgumentNullException(nameof(builder));
        }

        builder.AddExtension<RabbitMQExtensionConfigProvider>()
            .ConfigureOptions<RabbitMQOptions>((config, path, options) =>
            {
                options.ConnectionString = config.GetWebJobsConnectionString(Constants.RabbitMQ);
                IConfigurationSection section = config.GetSection(path);
                section.Bind(options);
            });

        builder.Services.AddSingleton<IRabbitMQServiceFactory, DefaultRabbitMQServiceFactory>();
        return builder;
    }