Browse Source

Update samples to netcoreapp3.0

master
Savorboard 5 years ago
parent
commit
9f84d7bfae
7 changed files with 27 additions and 30 deletions
  1. +3
    -5
      samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj
  2. +6
    -2
      samples/Sample.AzureServiceBus.InMemory/Startup.cs
  3. +3
    -5
      samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj
  4. +6
    -2
      samples/Sample.Kafka.MySql/Startup.cs
  5. +2
    -4
      samples/Sample.RabbitMQ.MongoDB/Sample.RabbitMQ.MongoDB.csproj
  6. +7
    -11
      samples/Sample.RabbitMQ.MongoDB/Startup.cs
  7. +0
    -1
      src/DotNetCore.CAP.AzureServiceBus/ITransport.AzureServiceBus.cs

+ 3
- 5
samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj View File

@@ -1,16 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<WarningsAsErrors>NU1701</WarningsAsErrors> <WarningsAsErrors>NU1701</WarningsAsErrors>
<NoWarn>NU1701</NoWarn> <NoWarn>NU1701</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\DotNetCore.CAP.AzureServiceBus\DotNetCore.CAP.AzureServiceBus.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.AzureServiceBus\DotNetCore.CAP.AzureServiceBus.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.InMemoryStorage\DotNetCore.CAP.InMemoryStorage.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.InMemoryStorage\DotNetCore.CAP.InMemoryStorage.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
</ItemGroup> </ItemGroup>


+ 6
- 2
samples/Sample.AzureServiceBus.InMemory/Startup.cs View File

@@ -14,12 +14,16 @@ namespace Sample.AzureServiceBus.InMemory
x.UseDashboard(); x.UseDashboard();
}); });


services.AddMvc();
services.AddControllers();
} }


public void Configure(IApplicationBuilder app) public void Configure(IApplicationBuilder app)
{ {
app.UseMvc();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
} }
} }
} }

+ 3
- 5
samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj View File

@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<WarningsAsErrors>NU1701</WarningsAsErrors> <WarningsAsErrors>NU1701</WarningsAsErrors>
<NoWarn>NU1701</NoWarn> <NoWarn>NU1701</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.Kafka\DotNetCore.CAP.Kafka.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.Kafka\DotNetCore.CAP.Kafka.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />


+ 6
- 2
samples/Sample.Kafka.MySql/Startup.cs View File

@@ -15,12 +15,16 @@ namespace Sample.Kafka.MySql
x.UseDashboard(); x.UseDashboard();
}); });


services.AddMvc();
services.AddControllers();
} }


public void Configure(IApplicationBuilder app) public void Configure(IApplicationBuilder app)
{ {
app.UseMvc();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
} }
} }
} }

+ 2
- 4
samples/Sample.RabbitMQ.MongoDB/Sample.RabbitMQ.MongoDB.csproj View File

@@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>7.1</LangVersion> <LangVersion>7.1</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>


<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.MongoDB\DotNetCore.CAP.MongoDB.csproj" /> <ProjectReference Include="..\..\src\DotNetCore.CAP.MongoDB\DotNetCore.CAP.MongoDB.csproj" />


+ 7
- 11
samples/Sample.RabbitMQ.MongoDB/Startup.cs View File

@@ -1,7 +1,4 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using MongoDB.Driver; using MongoDB.Driver;
@@ -26,17 +23,16 @@ namespace Sample.RabbitMQ.MongoDB
x.UseRabbitMQ("192.168.2.120"); x.UseRabbitMQ("192.168.2.120");
x.UseDashboard(); x.UseDashboard();
}); });
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddControllers();
} }


public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app)
{ {
if (env.IsDevelopment())
app.UseRouting();
app.UseEndpoints(endpoints =>
{ {
app.UseDeveloperExceptionPage();
}

app.UseMvc();
endpoints.MapControllers();
});
} }
} }
} }

+ 0
- 1
src/DotNetCore.CAP.AzureServiceBus/ITransport.AzureServiceBus.cs View File

@@ -24,7 +24,6 @@ namespace DotNetCore.CAP.AzureServiceBus


public AzureServiceBusTransport( public AzureServiceBusTransport(
ILogger<AzureServiceBusTransport> logger, ILogger<AzureServiceBusTransport> logger,
IOptions<CapOptions> options,
IOptions<AzureServiceBusOptions> asbOptions) IOptions<AzureServiceBusOptions> asbOptions)
{ {
_logger = logger; _logger = logger;


Loading…
Cancel
Save