Files
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

23 lines
770 B
C#

namespace SabreTools.Serialization.Readers
{
/// <summary>
/// Defines how to read from byte arrays
/// </summary>
public interface IByteReader<TModel>
{
/// <summary>
/// Enable outputting debug information
/// </summary>
public bool Debug { get; set; }
/// <summary>
/// Deserialize a byte array into <typeparamref name="TModel"/>
/// </summary>
/// <typeparam name="T">Type of object to deserialize to</typeparam>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <returns>Filled object on success, null on error</returns>
public TModel? Deserialize(byte[]? data, int offset);
}
}