public static IConveyBuilder AddConsul(this IConveyBuilder builder, Func <IConsulOptionsBuilder, IConsulOptionsBuilder> buildOptions, HttpClientOptions httpClientOptions) { var options = buildOptions(new ConsulOptionsBuilder()).Build(); return(builder.AddConsul(options, httpClientOptions)); }
public static IConveyBuilder AddConsul(this IConveyBuilder builder, string sectionName = SectionName, string httpClientSectionName = "httpClient") { var consulOptions = builder.GetOptions <ConsulOptions>(sectionName); var httpClientOptions = builder.GetOptions <HttpClientOptions>(httpClientSectionName); return(builder.AddConsul(consulOptions, httpClientOptions)); }
public static IConveyBuilder AddConsul(this IConveyBuilder builder, string sectionName = SectionName, string httpClientSectionName = "httpClient") { if (string.IsNullOrWhiteSpace(sectionName)) { sectionName = SectionName; } var consulOptions = builder.GetOptions <ConsulOptions>(sectionName); var httpClientOptions = builder.GetOptions <HttpClientOptions>(httpClientSectionName); return(builder.AddConsul(consulOptions, httpClientOptions)); }
public static IConveyBuilder AddInfrastructure(this IConveyBuilder builder) { builder.AddConsul(); return(builder); }