using System.Text.Json.Serialization; namespace DaggerFramework { public abstract class Resource : IDisposable { public string? Path { get => _path; set => _path = value; } [JsonIgnore] public byte[]? Buffer { get => _buffer; set => _buffer = value; } [JsonIgnore] public long BufferSize { get; set; } public Resource(string path, byte[] buffer) { _path = path; _buffer = buffer; } public void Dispose() { Buffer = null; Path = null; } private string? _path; private byte[]? _buffer; } }