30 lines
687 B
C#
30 lines
687 B
C#
// File: Models/MemoryRegion.cs
|
|
|
|
using System.Text.Json.Serialization;
|
|
using WebmrAPI.Utils;
|
|
|
|
namespace WebmrAPI.Models
|
|
{
|
|
public class MemoryRegion : ConcurrentObject
|
|
{
|
|
private long _addr = 0;
|
|
private ulong _size = 0;
|
|
|
|
[JsonIgnore]
|
|
public long MemoryAddress
|
|
{
|
|
get => LockedGet(ref _addr);
|
|
set => LockedSet(ref _addr, value);
|
|
}
|
|
public ulong MemorySize
|
|
{
|
|
get => LockedGet(ref _size);
|
|
set => LockedSet(ref _size, value);
|
|
}
|
|
public string? BaseAddress
|
|
{
|
|
get => (MemoryAddress > 0) ? $"0x{MemoryAddress:X16}" : null;
|
|
}
|
|
}
|
|
}
|