namespace Lantean.QBTMud.Models { public record MainData { public MainData( IDictionary torrents, IEnumerable tags, IDictionary categories, IDictionary> trackers, ServerState serverState, Dictionary> tagState, Dictionary> categoriesState, Dictionary> statusState, Dictionary> trackersState, int majorVersion) { Torrents = torrents.ToDictionary(); Tags = tags.ToHashSet(); Categories = categories.ToDictionary(); Trackers = trackers.ToDictionary(); ServerState = serverState; TagState = tagState; CategoriesState = categoriesState; StatusState = statusState; TrackersState = trackersState; MajorVersion = majorVersion; } public Dictionary Torrents { get; } public HashSet Tags { get; } public Dictionary Categories { get; } public Dictionary> Trackers { get; } public ServerState ServerState { get; } public Dictionary> TagState { get; } public Dictionary> CategoriesState { get; } public Dictionary> StatusState { get; } public Dictionary> TrackersState { get; } public string? SelectedTorrentHash { get; set; } public bool LostConnection { get; set; } public int MajorVersion { get; } } }