namespace Connected.Net.Hubs { public sealed class Message { private static ulong _identity = 0UL; public Message(Client client, TArgs args) { Client = client; Arguments = args; Id = Interlocked.Increment(ref _identity); Expire = DateTime.UtcNow.AddMinutes(5); } public Client Client { get; } public ulong Id { get; } public string? Key { get; set; } public TArgs? Arguments { get; } public DateTime NextVisible { get; set; } = DateTime.UtcNow.AddSeconds(5); public DateTime Expire { get; } } }