public static IDrexBuilder AddFabio(this IDrexBuilder builder, Func <IFabioOptionsBuilder, IFabioOptionsBuilder> buildOptions, Func <IConsulOptionsBuilder, IConsulOptionsBuilder> buildConsulOptions, HttpClientOptions httpClientOptions) { var fabioOptions = buildOptions(new FabioOptionsBuilder()).Build(); return(builder.AddFabio(fabioOptions, httpClientOptions, b => b.AddConsul(buildConsulOptions, httpClientOptions))); }
public static IDrexBuilder AddFabio(this IDrexBuilder builder, string sectionName = SectionName, string consulSectionName = "consul", string httpClientSectionName = "httpClient") { if (string.IsNullOrWhiteSpace(sectionName)) { sectionName = SectionName; } var fabioOptions = builder.GetOptions <FabioOptions>(sectionName); var consulOptions = builder.GetOptions <ConsulOptions>(consulSectionName); var httpClientOptions = builder.GetOptions <HttpClientOptions>(httpClientSectionName); return(builder.AddFabio(fabioOptions, httpClientOptions, b => b.AddConsul(consulOptions, httpClientOptions))); }
public static IDrexBuilder AddFabio(this IDrexBuilder builder, FabioOptions fabioOptions, ConsulOptions consulOptions, HttpClientOptions httpClientOptions) { return(builder.AddFabio(fabioOptions, httpClientOptions, b => b.AddConsul(consulOptions, httpClientOptions))); }