aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-11-13 17:46:54 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-11-13 17:46:54 -0600
commit56339e50cc78e963b9634143af0986919cad4d43 (patch)
treeb575f1891545ac8f54a27f966048a64497be25b4 /src
parent4840210789217841426e598e0b8641082d24f944 (diff)
downloadslskd-56339e50cc78e963b9634143af0986919cad4d43.tar.gz
upgrade to .net 6
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Common/Compute.cs2
-rw-r--r--src/slskd/Common/Extensions.cs2
-rw-r--r--src/slskd/Core/API/Controllers/ApplicationController.cs2
-rw-r--r--src/slskd/Integrations/FTP/FTPService.cs2
-rw-r--r--src/slskd/Startup.cs2
-rw-r--r--src/slskd/slskd.csproj12
6 files changed, 11 insertions, 11 deletions
diff --git a/src/slskd/Common/Compute.cs b/src/slskd/Common/Compute.cs
index 464a932d..eacaedf1 100644
--- a/src/slskd/Common/Compute.cs
+++ b/src/slskd/Common/Compute.cs
@@ -41,7 +41,7 @@ namespace slskd
public static string Sha1Hash(string str)
{
- using var sha1 = new SHA1Managed();
+ using var sha1 = SHA1.Create();
return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty);
}
diff --git a/src/slskd/Common/Extensions.cs b/src/slskd/Common/Extensions.cs
index 03bec7fe..79314389 100644
--- a/src/slskd/Common/Extensions.cs
+++ b/src/slskd/Common/Extensions.cs
@@ -284,7 +284,7 @@ namespace slskd
var options = new JsonSerializerOptions();
options.Converters.Add(new IPAddressConverter());
options.Converters.Add(new JsonStringEnumConverter());
- options.IgnoreNullValues = true;
+ options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
return options;
}
}
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs
index a7168efb..82b1d6c5 100644
--- a/src/slskd/Core/API/Controllers/ApplicationController.cs
+++ b/src/slskd/Core/API/Controllers/ApplicationController.cs
@@ -119,7 +119,7 @@ namespace slskd.Core.API
/// <returns></returns>
[HttpPost("gc")]
[Authorize]
- public async Task<IActionResult> CollectGarbage()
+ public IActionResult CollectGarbage()
{
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
GC.Collect(2, GCCollectionMode.Forced, blocking: false, compacting: true);
diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs
index dd1b340f..32b8b253 100644
--- a/src/slskd/Integrations/FTP/FTPService.cs
+++ b/src/slskd/Integrations/FTP/FTPService.cs
@@ -62,7 +62,7 @@ namespace slskd.Integrations.FTP
{
if (!FtpOptions.Enabled)
{
- Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled");
+ Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled", filename);
return;
}
diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs
index a8b64305..ac4a2789 100644
--- a/src/slskd/Startup.cs
+++ b/src/slskd/Startup.cs
@@ -169,7 +169,7 @@ namespace slskd
{
options.JsonSerializerOptions.Converters.Add(new IPAddressConverter());
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
- options.JsonSerializerOptions.IgnoreNullValues = true;
+ options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
});
services.AddSignalR().AddJsonProtocol(options =>
diff --git a/src/slskd/slskd.csproj b/src/slskd/slskd.csproj
index 58f7cfe0..65f6845c 100644
--- a/src/slskd/slskd.csproj
+++ b/src/slskd/slskd.csproj
@@ -8,7 +8,7 @@
</PropertyGroup>
<PropertyGroup>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<CodeAnalysisRuleSet>Properties\analysis.ruleset</CodeAnalysisRuleSet>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -43,15 +43,15 @@
<ItemGroup>
<PackageReference Include="FluentFTP" Version="35.0.5" />
- <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.11" />
+ <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
- <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
+ <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.11" />
- <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.11" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.11" />
+ <PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.0" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.0" />
<PackageReference Include="prometheus-net" Version="5.0.1" />
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.1" />
<PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="5.0.1" />