Skip to content

Commit

Permalink
Upgrade to Ocelot 11.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lfzm committed Sep 13, 2018
1 parent 805aeeb commit 0d2d7b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/OcelotOrleans.AspNetCore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Ocelot.Middleware;
using Ocelot.OrleansHttpGateway.Configuration;
using Ocelot.OrleansHttpGateway.Requester;
using Ocelot.Provider.Consul;
using Orleans.Hosting;
using System;
using System.IO;
Expand Down
Binary file modified example/OcelotOrleans.AspNetCore/wwwroot/OrleansInterface.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Newtonsoft.Json;
using Ocelot.Configuration.Repository;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using Ocelot.OrleansHttpGateway.Configuration;
using Ocelot.OrleansHttpGateway.Infrastructure;
using Ocelot.OrleansHttpGateway.Requester;
using Ocelot.ServiceDiscovery;
using Orleans;
using Orleans.Configuration;
using Orleans.Runtime;
using System;
using System.Linq;
using System.Threading.Tasks;

namespace Ocelot.DependencyInjection
{
Expand Down Expand Up @@ -60,6 +63,10 @@ private static IServiceCollection AddOrleansHttpGateway(this IServiceCollection
services.TryAddSingleton<IGrainReference, DefaultGrainReference>();
services.TryAddSingleton<IRouteValuesBuilder, DefaultRouteValuesBuilder>();
services.TryAddSingleton<IParameterBinder, DefaultParameterBinder>();

//Orleans need to use ServiceName configuration, configure ServiceName must have a service discovery provider, component forgery one
if (services.Where(s => s.ServiceType.Name == typeof(ServiceDiscoveryFinderDelegate).Name).Count() == 0)
services.TryAddSingleton<ServiceDiscoveryFinderDelegate>((provider, config, name) => throw new Exception($"Unable to find service discovery provider for type: {config.Type}"));
return services;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Core" Version="2.0.3" />
<PackageReference Include="Ocelot" Version="10.0.4" />
<PackageReference Include="Ocelot" Version="11.0.2" />
</ItemGroup>

</Project>

0 comments on commit 0d2d7b1

Please sign in to comment.