Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
raman-m committed Aug 22, 2023
1 parent 74000e2 commit b673311
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Ocelot/DependencyInjection/OcelotBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public OcelotBuilder(IServiceCollection services, IConfiguration configurationRo
.AddApplicationPart(assembly)
.AddControllersAsServices()
.AddAuthorization()
.AddNewtonsoftJson();
.AddNewtonsoftJson();

Services.AddLogging();
Services.AddMiddlewareAnalysis();
Expand All @@ -200,16 +200,16 @@ public IOcelotBuilder AddCustomLoadBalancer<T>()
AddCustomLoadBalancer((provider, route, serviceDiscoveryProvider) => new T());
return this;
}

public IOcelotBuilder AddCustomLoadBalancer<T>(Func<T> loadBalancerFactoryFunc)
where T : ILoadBalancer
{
AddCustomLoadBalancer((provider, route, serviceDiscoveryProvider) =>
loadBalancerFactoryFunc());
return this;
}
public IOcelotBuilder AddCustomLoadBalancer<T>(Func<IServiceProvider, T> loadBalancerFactoryFunc)

public IOcelotBuilder AddCustomLoadBalancer<T>(Func<IServiceProvider, T> loadBalancerFactoryFunc)
where T : ILoadBalancer
{
AddCustomLoadBalancer((provider, route, serviceDiscoveryProvider) =>
Expand All @@ -230,7 +230,7 @@ public IOcelotBuilder AddCustomLoadBalancer<T>(Func<IServiceProvider, Downstream
{
Services.AddSingleton<ILoadBalancerCreator>(provider =>
new DelegateInvokingLoadBalancerCreator<T>(
(route, serviceDiscoveryProvider) =>
(route, serviceDiscoveryProvider) =>
loadBalancerFactoryFunc(provider, route, serviceDiscoveryProvider)));
return this;
}
Expand Down Expand Up @@ -296,8 +296,8 @@ public IOcelotBuilder AddConfigPlaceholders()

Services.Replace(ServiceDescriptor.Describe(
typeof(IPlaceholders),
s => (IPlaceholders) objectFactory(s,
new[] {CreateInstance(s, wrappedDescriptor)}),
s => (IPlaceholders)objectFactory(s,
new[] { CreateInstance(s, wrappedDescriptor) }),
wrappedDescriptor.Lifetime
));

Expand Down

0 comments on commit b673311

Please sign in to comment.