public static IFixerBuilder AddServiceClient <T>(this IFixerBuilder builder, string serviceName, string sectionName = SectionName, string consulSectionName = "consul", string fabioSectionName = "fabio", string httpClientSectionName = "httpClient") where T : class { var restEaseOptions = builder.GetOptions <RestEaseOptions>(sectionName); return(builder.AddServiceClient <T>(serviceName, restEaseOptions, b => b.AddFabio(fabioSectionName, consulSectionName, httpClientSectionName))); }
public static IFixerBuilder AddServiceClient <T>(this IFixerBuilder builder, string serviceName, Func <IRestEaseOptionsBuilder, IRestEaseOptionsBuilder> buildOptions, Func <IConsulOptionsBuilder, IConsulOptionsBuilder> buildConsulOptions, Func <IFabioOptionsBuilder, IFabioOptionsBuilder> buildFabioOptions, HttpClientOptions httpClientOptions) where T : class { var options = buildOptions(new RestEaseOptionsBuilder()).Build(); return(builder.AddServiceClient <T>(serviceName, options, b => b.AddFabio(buildFabioOptions, buildConsulOptions, httpClientOptions))); }
public static IFixerBuilder AddServiceClient <T>(this IFixerBuilder builder, string serviceName, RestEaseOptions options, ConsulOptions consulOptions, FabioOptions fabioOptions, HttpClientOptions httpClientOptions) where T : class => builder.AddServiceClient <T>(serviceName, options, b => b.AddFabio(fabioOptions, consulOptions, httpClientOptions));