// File: Models/ProcessInfo.cs using System.Runtime.Versioning; using System.Text.Json.Serialization; using WebmrAPI.Utils; namespace WebmrAPI.Models { [SupportedOSPlatform("windows")] public class ProcessInfo : ProcessBaseInfo { [JsonIgnore] public LazyConcurrentContainer MemoryRegionsContainer { get; set; } = new(); [JsonIgnore] public LazyConcurrentContainer ModulesContainer { get; set; } = new(); [JsonIgnore] public LazyConcurrentContainer ThreadsContainer { get; set; } = new(); [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable? MemoryRegions { get => MemoryRegionsContainer.Values; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable? Modules { get => ModulesContainer.Values; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IEnumerable? Threads { get => ThreadsContainer.Values; } } }