public static IDrexBuilder AddConsul(this IDrexBuilder builder, Func <IConsulOptionsBuilder, IConsulOptionsBuilder> buildOptions, HttpClientOptions httpClientOptions) { var options = buildOptions(new ConsulOptionsBuilder()).Build(); return(builder.AddConsul(options, httpClientOptions)); }
public static IDrexBuilder AddConsul(this IDrexBuilder 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)); }