using MemoryPack; namespace Insight.Agent.Messages { [MemoryPackUnion(1, typeof(Authentication))] [MemoryPackUnion(2, typeof(AuthenticationRequest))] public partial interface IAgentMessage { } [MemoryPackable] public partial class Authentication : IAgentMessage { [MemoryPackOrder(0)] public PlatformType? Platform { get; set; } [MemoryPackOrder(1)] public Guid Serial { get; set; } [MemoryPackOrder(2)] public Version? Version { get; set; } [MemoryPackOrder(3)] public string? Hostname { get; set; } public enum PlatformType { Unknown = 0, Windows = 1, Unix = 2 } } [MemoryPackable] public partial class AuthenticationRequest : IAgentMessage { } }