namespace qmonlib { public class QMonReceiverConfiguration : QMonHostConfiguration { public Uri SourceUriGeneral { get; set; } public Uri SourceUriData { get; set; } public TimeSpan GeneralReceiverInterval { get; set; } public DataCacheConfiguration DataCache { get; set; } = new(); public static QMonReceiverConfiguration CreateDefault() { return new QMonReceiverConfiguration() { Enabled = true, SourceUriGeneral = new Uri("udp://0.0.0.0:5100"), SourceUriData = new Uri("udp://0.0.0.0:5101"), GeneralReceiverInterval = TimeSpan.FromSeconds(5), DataCache = new DataCacheConfiguration() { Path = "%AppData%\\.qmon", RecordRetentionTimeSpan = TimeSpan.FromHours(5), FlushCacheInterval = TimeSpan.FromSeconds(5) } }; } public class DataCacheConfiguration { public string Path { get; set; } public TimeSpan RecordRetentionTimeSpan { get; set; } public TimeSpan FlushCacheInterval { get; set; } } } }