Skip to content

Commit

Permalink
feat: upgrade to latest preview
Browse files Browse the repository at this point in the history
  • Loading branch information
alsami committed Aug 21, 2021
1 parent 94053ed commit 208e429
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 45 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: required
os: linux
dist: bionic
language: csharp
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<LangVersion>9.0</LangVersion>
<Nullable>Enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.25.0.33663">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.27.0.35380">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100-preview.6.21355.2",
"version": "6.0.100-preview.7.21379.14",
"rollForward": "latestFeature"
}
}
10 changes: 5 additions & 5 deletions src/Covid19Api.Domain/VaccinationStatisticValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Covid19Api.Domain
{
public class VaccinationStatisticValue
{
public VaccinationStatisticValue(DateTime loggedAt, uint totalVaccinations, uint peopleVaccinated, uint peopleFullyVaccinated, double peopleFullyVaccinatedPerHundred, uint dailyVaccinations, double totalVaccinationsPerHundred, double peopleVaccinatedPerHundred, uint dailyVaccinationsPerMillion)
public VaccinationStatisticValue(DateTime loggedAt, ulong totalVaccinations, ulong peopleVaccinated, ulong peopleFullyVaccinated, double peopleFullyVaccinatedPerHundred, ulong dailyVaccinations, double totalVaccinationsPerHundred, double peopleVaccinatedPerHundred, uint dailyVaccinationsPerMillion)
{
this.LoggedAt = loggedAt;
this.TotalVaccinations = totalVaccinations;
Expand All @@ -22,15 +22,15 @@ public VaccinationStatisticValue(DateTime loggedAt, uint totalVaccinations, uint

public DateTime LoggedAt { get; private set; }

public uint TotalVaccinations { get; private set; }
public ulong TotalVaccinations { get; private set; }

public uint PeopleVaccinated { get; private set; }
public ulong PeopleVaccinated { get; private set; }

public uint PeopleFullyVaccinated { get; private set; }
public ulong PeopleFullyVaccinated { get; private set; }

public double PeopleFullyVaccinatedPerHundred { get; private set; }

public uint DailyVaccinations { get; private set; }
public ulong DailyVaccinations { get; private set; }

public double TotalVaccinationsPerHundred { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<PackageReference Include="MediatR.Extensions.Autofac.DependencyInjection" Version="7.3.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-preview.5.21301.5" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-preview.5.21301.5" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Covid19Api.Mongo/Covid19Api.Mongo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MongoDB.Driver" Version="2.12.4" />
<PackageReference Include="MongoDB.Driver" Version="2.13.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public record VaccinationStatisticForCountryDto(
string Country,
string CountryCode,
DateTime LoggedAt,
uint TotalVaccinations,
uint PeopleVaccinated,
uint PeopleFullyVaccinated,
ulong TotalVaccinations,
ulong PeopleVaccinated,
ulong PeopleFullyVaccinated,
double PeopleFullyVaccinatedPerHundred,
uint DailyVaccinations,
ulong DailyVaccinations,
double TotalVaccinationsPerHundred,
double PeopleVaccinatedPerHundred, uint DailyVaccinationsPerMillion);
double PeopleVaccinatedPerHundred, ulong DailyVaccinationsPerMillion);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Covid19Api.Presentation.Response
{
public record VaccinationStatisticValueDto(DateTime LoggedAt, uint TotalVaccinations, uint PeopleVaccinated, uint PeopleFullyVaccinated, double PeopleFullyVaccinatedPerHundred, uint DailyVaccinations, double TotalVaccinationsPerHundred, double PeopleVaccinatedPerHundred, uint DailyVaccinationsPerMillion)
public record VaccinationStatisticValueDto(DateTime LoggedAt, ulong TotalVaccinations, ulong PeopleVaccinated, ulong PeopleFullyVaccinated, double PeopleFullyVaccinatedPerHundred, ulong DailyVaccinations, double TotalVaccinationsPerHundred, double PeopleVaccinatedPerHundred, uint DailyVaccinationsPerMillion)
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.34" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.36" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ internal class VaccinationStatisticValueModel
public DateTime LoggedAt { get; set; }

[JsonPropertyName("total_vaccinations")]
public uint? TotalVaccinations { get; set; }
public ulong? TotalVaccinations { get; set; }

[JsonPropertyName("people_vaccinated")]
public uint PeopleVaccinated { get; set; }
public ulong PeopleVaccinated { get; set; }

[JsonPropertyName("people_fully_vaccinated")]
public uint PeopleFullyVaccinated { get; set; }
public ulong PeopleFullyVaccinated { get; set; }

[JsonPropertyName("people_fully_vaccinated_per_hundred")]
public double PeopleFullyVaccinatedPerHundred { get; set; }

[JsonPropertyName("daily_vaccinations")]
public uint DailyVaccinations { get; set; }
public ulong DailyVaccinations { get; set; }

[JsonPropertyName("total_vaccinations_per_hundred")]
public double TotalVaccinationsPerHundred { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions src/Covid19Api.Worker/DataRefreshWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,29 @@ await Task.WhenAll(
this.RefreshVaccinationStatistics(mediator));
}

private Task RefreshCountryStatistics(ISender mediator, DateTime fetchedAt)
private async Task RefreshCountryStatistics(ISender mediator, DateTime fetchedAt)
{
this.logger.LogInformation("Refreshing countries-statistics");

var refreshCountriesStatisticsCommand = new RefreshCountriesStatisticsCommand(fetchedAt);

return mediator.Send(refreshCountriesStatisticsCommand);
await mediator.Send(refreshCountriesStatisticsCommand);
}

private Task RefreshGlobalStatistics(ISender mediator, DateTime fetchedAt)
private async Task RefreshGlobalStatistics(ISender mediator, DateTime fetchedAt)
{
this.logger.LogInformation("Refreshing global-statistics");

var refreshGlobalStatisticsCommand = new RefreshGlobalStatisticsCommand(fetchedAt);

return mediator.Send(refreshGlobalStatisticsCommand);
await mediator.Send(refreshGlobalStatisticsCommand);
}

private Task RefreshVaccinationStatistics(ISender mediator)
private async Task RefreshVaccinationStatistics(ISender mediator)
{
this.logger.LogInformation("Refreshing vaccination-statistics");

return mediator.Send(new RefreshVaccinationStatisticsCommand());
await mediator.Send(new RefreshVaccinationStatisticsCommand());
}
}
}
10 changes: 5 additions & 5 deletions src/Covid19Api/Covid19Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<ItemGroup>
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="5.4.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="6.1.4" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.1.5" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.1.5" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="6.1.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Covid19Api/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"ConnectionStrings": {
"MongoDb": "mongodb://root:root@localhost:27017/Covid19Api?authSource=admin"
},
"DisableWorker": true
"DisableWorker": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

<ItemGroup>
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="5.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
<PackageReference Include="coverlet.msbuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="FluentAssertions" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions test/Covid19Api.Tests/Covid19Api.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0-preview.5.21301.17" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
<PackageReference Include="coverlet.msbuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 208e429

Please sign in to comment.