Update NuGet packages

This commit is contained in:
Tyrrrz
2021-11-15 18:02:41 +02:00
parent d8de3bf779
commit da9536bd1b
4 changed files with 7 additions and 27 deletions

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JsonExtensions" Version="1.1.0" />
<PackageReference Include="JsonExtensions" Version="1.2.0" />
<PackageReference Include="MiniRazor.CodeGen" Version="2.2.0" />
<PackageReference Include="Polly" Version="7.2.2" />
<PackageReference Include="Superpower" Version="3.0.0" />

View File

@@ -1,20 +0,0 @@
using System;
using System.Text.Json;
namespace DiscordChatExporter.Core.Utils.Extensions
{
public static class JsonExtensions
{
public static string GetNonWhiteSpaceString(this JsonElement json)
{
if (json.ValueKind != JsonValueKind.String)
throw new FormatException();
var value = json.GetString();
if (string.IsNullOrWhiteSpace(value))
throw new FormatException();
return value;
}
}
}