Messagepack (#12)

* add messagepack attributes

* fix isnullorempty

* bump api version

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2023-02-10 12:30:43 +01:00
committed by GitHub
parent f604e6d27e
commit 381f9a4808
28 changed files with 72 additions and 10 deletions

View File

@@ -1,7 +1,9 @@
using MareSynchronos.API.Data;
using MessagePack;
namespace MareSynchronos.API.Dto;
[MessagePackObject(keyAsPropertyName: true)]
public record ConnectionDto(UserData User)
{
public int ServerVersion { get; set; }
@@ -10,6 +12,7 @@ public record ConnectionDto(UserData User)
public ServerInfo ServerInfo { get; set; } = new();
}
[MessagePackObject(keyAsPropertyName: true)]
public record ServerInfo
{
public string ShardName { get; set; } = string.Empty;