Use System.Text.Json instead of Newtonsoft.Json

This commit is contained in:
Alexey Golub
2020-04-21 18:15:28 +03:00
parent f153aad3f1
commit 130c0b6fe2
14 changed files with 195 additions and 179 deletions

View File

@@ -4,7 +4,7 @@ namespace DiscordChatExporter.Core.Models
{
// Loosely based on https://github.com/omar/ByteSize (MIT license)
public readonly struct FileSize
public readonly partial struct FileSize
{
public long TotalBytes { get; }
@@ -58,4 +58,9 @@ namespace DiscordChatExporter.Core.Models
public override string ToString() => $"{GetLargestWholeNumberValue():0.##} {GetLargestWholeNumberSymbol()}";
}
public partial struct FileSize
{
public static FileSize FromBytes(long bytes) => new FileSize(bytes);
}
}

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
namespace DiscordChatExporter.Core.Models
{