using System.ComponentModel; namespace PKHeX.Core; /// /// Base class for a savegame data reader. /// public abstract class SaveBlock : IDataIndirect where T : SaveFile { protected readonly T SAV; [Browsable(false)] public byte[] Data { get; } [Browsable(false)] public int Offset { get; protected init; } protected SaveBlock(T sav) : this(sav, sav.Data) { } protected SaveBlock(T sav, byte[] data) { SAV = sav; Data = data; } } public interface IDataIndirect { int Offset { get; } byte[] Data { get; } }