配置文件功能完善

This commit is contained in:
rmbgame
2021-03-06 10:57:02 +08:00
parent 3cbcabeedf
commit ca93b3f9c8
29 changed files with 906 additions and 77 deletions
+11
View File
@@ -1,6 +1,7 @@
using MessagePack;
using Newtonsoft.Json;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text;
using System.Text.Encodings.Web;
using System.Threading;
@@ -181,6 +182,16 @@ namespace System
public static T DMP<T>(byte[] buffer, CancellationToken cancellationToken = default)
=> MessagePackSerializer.Deserialize<T>(buffer, cancellationToken: cancellationToken);
/// <summary>
/// (Deserialize)MessagePack 反序列化
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="buffer"></param>
/// <returns></returns>
[return: MaybeNull]
public static T DMP<T>(Stream buffer, CancellationToken cancellationToken = default)
=> MessagePackSerializer.Deserialize<T>(buffer, cancellationToken: cancellationToken);
/// <summary>
/// (Deserialize)MessagePack 反序列化 + Base64Url Decode
/// </summary>