mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-07-01 20:48:15 +08:00
Updated packages (#1133)
* Upgrading nugets * doc changes * more changes to remove warnings * one more fix * one more fix * forcing the build
This commit is contained in:
@ -6,8 +6,8 @@
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Ocelot" Version="14.0.3" />
|
||||
<PackageReference Include="Ocelot.Administration" Version="14.0.3" />
|
||||
<PackageReference Include="Ocelot" Version="14.0.9" />
|
||||
<PackageReference Include="Ocelot.Administration" Version="14.0.9" />
|
||||
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ocelot" Version="13.8.4" />
|
||||
<PackageReference Include="ocelot" Version="14.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -15,9 +15,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Ocelot" Version="13.5.1" />
|
||||
<PackageReference Include="Ocelot.Provider.Eureka" Version="13.5.1" />
|
||||
<PackageReference Include="Ocelot.Provider.Polly" Version="13.5.1" />
|
||||
<PackageReference Include="Ocelot" Version="14.0.9" />
|
||||
<PackageReference Include="Ocelot.Provider.Eureka" Version="14.0.9" />
|
||||
<PackageReference Include="Ocelot.Provider.Polly" Version="14.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -11,6 +11,7 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DownstreamService
|
||||
{
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Steeltoe.Discovery.Client;
|
||||
|
||||
public class Startup
|
||||
@ -30,7 +31,7 @@ namespace DownstreamService
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Ocelot" Version="5.5.1" />
|
||||
<PackageReference Include="GraphQL" Version="2.0.0-alpha-870" />
|
||||
<PackageReference Include="Ocelot" Version="14.0.9" />
|
||||
<PackageReference Include="GraphQL" Version="2.4.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -28,7 +28,7 @@ namespace OcelotGraphQL
|
||||
|
||||
public class Query
|
||||
{
|
||||
private List<Hero> _heroes = new List<Hero>
|
||||
private readonly List<Hero> _heroes = new List<Hero>
|
||||
{
|
||||
new Hero { Id = 1, Name = "R2-D2" },
|
||||
new Hero { Id = 2, Name = "Batman" },
|
||||
@ -58,7 +58,7 @@ namespace OcelotGraphQL
|
||||
var query = await request.Content.ReadAsStringAsync();
|
||||
|
||||
//if not body try query string, dont hack like this in real world..
|
||||
if(query.Length == 0)
|
||||
if (query.Length == 0)
|
||||
{
|
||||
var decoded = WebUtility.UrlDecode(request.RequestUri.Query);
|
||||
query = decoded.Replace("?query=", "");
|
||||
@ -82,7 +82,7 @@ namespace OcelotGraphQL
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
var schema = Schema.For(@"
|
||||
type Hero {
|
||||
@ -93,7 +93,8 @@ namespace OcelotGraphQL
|
||||
type Query {
|
||||
hero(id: Int): Hero
|
||||
}
|
||||
", _ => {
|
||||
", _ =>
|
||||
{
|
||||
_.Types.Include<Query>();
|
||||
});
|
||||
|
||||
@ -109,10 +110,11 @@ namespace OcelotGraphQL
|
||||
.AddJsonFile("ocelot.json", false, false)
|
||||
.AddEnvironmentVariables();
|
||||
})
|
||||
.ConfigureServices(s => {
|
||||
s.AddSingleton<ISchema>(schema);
|
||||
s.AddOcelot()
|
||||
.AddSingletonDelegatingHandler<GraphQlDelegatingHandler>();
|
||||
.ConfigureServices(s =>
|
||||
{
|
||||
s.AddSingleton<ISchema>(schema);
|
||||
s.AddOcelot()
|
||||
.AddDelegatingHandler<GraphQlDelegatingHandler>();
|
||||
})
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
{
|
||||
@ -125,7 +127,7 @@ namespace OcelotGraphQL
|
||||
app.UseOcelot().Wait();
|
||||
})
|
||||
.Build()
|
||||
.Run();
|
||||
}
|
||||
.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,11 +7,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.7.9" />
|
||||
<PackageReference Include="Ocelot" Version="13.5.1" />
|
||||
<PackageReference Include="Ocelot.Provider.Kubernetes" Version="13.5.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
|
||||
<PackageReference Include="Ocelot" Version="14.0.9" />
|
||||
<PackageReference Include="Ocelot.Provider.Kubernetes" Version="14.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -7,9 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.7.9" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,21 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Stateless Service Application</Description>
|
||||
<Authors> </Authors>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>OcelotApplicationService</AssemblyName>
|
||||
<PackageId>OcelotApplicationService</PackageId>
|
||||
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||

|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ServiceFabric" Version="6.1.456"/>
|
||||
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="3.0.456"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.2"/>
|
||||
<PackageReference Include="Microsoft.ServiceFabric.AspNetCore.Kestrel" Version="3.0.456"/>
|
||||
</ItemGroup>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Stateless Service Application</Description>
|
||||
<Authors> </Authors>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>OcelotApplicationService</AssemblyName>
|
||||
<PackageId>OcelotApplicationService</PackageId>
|
||||
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ServiceFabric" Version="6.1.456" />
|
||||
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="3.0.456" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.ServiceFabric.AspNetCore.Kestrel" Version="3.0.456" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user