ExtraChat/client/ExtraChat/Protocol/ListResponse.cs
2022-07-07 22:59:33 -04:00

23 lines
649 B
C#

using ExtraChat.Formatters;
using ExtraChat.Protocol.Channels;
using MessagePack;
namespace ExtraChat.Protocol;
[Serializable]
[MessagePackObject]
[MessagePackFormatter(typeof(ListResponseFormatter))]
public abstract record ListResponse {
[MessagePackObject]
public record All(Channel[] AllChannels, Channel[] AllInvites) : ListResponse;
[MessagePackObject]
public record Channels(SimpleChannel[] SimpleChannels) : ListResponse;
[MessagePackObject]
public record Members(Guid ChannelId, Member[] AllMembers) : ListResponse;
[MessagePackObject]
public record Invites(SimpleChannel[] AllInvites) : ListResponse;
}