mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-17 15:08:24 +00:00
Update NuGet packages
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user