Przeglądaj źródła

Update samples to netcoreapp3.0

master
Savorboard 5 lat temu
rodzic
commit
9f84d7bfae
7 zmienionych plików z 27 dodań i 30 usunięć
  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 Wyświetl plik

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

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<WarningsAsErrors>NU1701</WarningsAsErrors>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<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\DotNetCore.CAP.csproj" />
</ItemGroup>


+ 6
- 2
samples/Sample.AzureServiceBus.InMemory/Startup.cs Wyświetl plik

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

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

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

+ 3
- 5
samples/Sample.Kafka.MySql/Sample.Kafka.MySql.csproj Wyświetl plik

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

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<WarningsAsErrors>NU1701</WarningsAsErrors>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</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.MySql\DotNetCore.CAP.MySql.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />


+ 6
- 2
samples/Sample.Kafka.MySql/Startup.cs Wyświetl plik

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

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

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

+ 2
- 4
samples/Sample.RabbitMQ.MongoDB/Sample.RabbitMQ.MongoDB.csproj Wyświetl plik

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

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</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.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.MongoDB\DotNetCore.CAP.MongoDB.csproj" />


+ 7
- 11
samples/Sample.RabbitMQ.MongoDB/Startup.cs Wyświetl plik

@@ -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.DependencyInjection;
using MongoDB.Driver;
@@ -26,17 +23,16 @@ namespace Sample.RabbitMQ.MongoDB
x.UseRabbitMQ("192.168.2.120");
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 Wyświetl plik

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

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


Ładowanie…
Anuluj
Zapisz