38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
// 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<MemoryRegionInfo> MemoryRegionsContainer { get; set; } = new();
|
|
[JsonIgnore]
|
|
public LazyConcurrentContainer<ProcessModuleInfo> ModulesContainer { get; set; } = new();
|
|
[JsonIgnore]
|
|
public LazyConcurrentContainer<ProcessThreadInfo> ThreadsContainer { get; set; } = new();
|
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public IEnumerable<MemoryRegionInfo>? MemoryRegions
|
|
{
|
|
get => MemoryRegionsContainer.Values;
|
|
}
|
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public IEnumerable<ProcessModuleInfo>? Modules
|
|
{
|
|
get => ModulesContainer.Values;
|
|
}
|
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public IEnumerable<ProcessThreadInfo>? Threads
|
|
{
|
|
get => ThreadsContainer.Values;
|
|
}
|
|
}
|
|
}
|