Correct .NET 6.0 warnings

This commit is contained in:
Archi
2021-07-27 17:26:26 +02:00
parent e6c191a6f6
commit 5ffb1ce5d9
2 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
throw new InvalidOperationException(nameof(response.Content.Link));
}
return Uri.EscapeUriString(response.Content.Link);
return Uri.EscapeDataString(response.Content.Link);
}
#pragma warning disable CA1812 // False positive, the class is used during json deserialization

View File

@@ -21,6 +21,7 @@
#if NETFRAMEWORK
using ArchiSteamFarm.Compatibility;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Converters;
using File = System.IO.File;
using Path = System.IO.Path;
@@ -43,7 +44,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Headers;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Net.Http.Headers;
@@ -323,10 +323,10 @@ namespace ArchiSteamFarm.IPC {
mvc.AddControllersAsServices();
#if NETFRAMEWORK
// Use latest compatibility version for MVC
mvc.SetCompatibilityVersion(CompatibilityVersion.Latest);
#if NETFRAMEWORK
// Add standard formatters
mvc.AddFormatterMappings();