mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-16 14:38:19 +00:00
Use System.Text.Json instead of Newtonsoft.Json
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user