mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Add debug flag to interface definitions (fixes #60)
This commit is contained in:
@@ -9,6 +9,9 @@ namespace SabreTools.Serialization.CrossModel
|
||||
/// <typeparam name="TModel">Model convertable to <see cref="MetadataFile"/></typeparam>
|
||||
public abstract class BaseMetadataSerializer<TModel> : ICrossModel<TModel, MetadataFile>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public abstract TModel? Deserialize(MetadataFile? obj);
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </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>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IByteWriter<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Serialize a <typeparamref name="TModel"/> into a byte array
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface ICrossModel<TSource, TDest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize a <typeparamref name="TDest"/> into <typeparamref name="TSource"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IFileReader<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize a file into <typeparamref name="TModel"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IFileWriter<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Serialize a <typeparamref name="TModel"/> into a file
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IStreamReader<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize a Stream into <typeparamref name="TModel"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IStreamWriter<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Serialize a <typeparamref name="TModel"/> into a Stream
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IStringReader<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize a string into <typeparamref name="TModel"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@ namespace SabreTools.Serialization.Interfaces
|
||||
/// </summary>
|
||||
public interface IStringWriter<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Enable outputting debug information
|
||||
/// </summary>
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Serialize a <typeparamref name="TModel"/> into a string
|
||||
/// </summary>
|
||||
|
||||
@@ -16,6 +16,9 @@ namespace SabreTools.Serialization.Readers
|
||||
IFileReader<TModel>,
|
||||
IStreamReader<TModel>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
#region IByteReader
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -4,6 +4,9 @@ namespace SabreTools.Serialization.Readers
|
||||
{
|
||||
public partial class XMID : IStringReader<Data.Models.Xbox.XMID>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
/// <inheritdoc cref="IStringReader.Deserialize(string?)"/>
|
||||
public static Data.Models.Xbox.XMID? DeserializeString(string? str)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,9 @@ namespace SabreTools.Serialization.Readers
|
||||
{
|
||||
public partial class XeMID : IStringReader<Data.Models.Xbox.XeMID>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
/// <inheritdoc cref="IStringReader.Deserialize(string?)"/>
|
||||
public static Data.Models.Xbox.XeMID? DeserializeString(string? str)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,9 @@ namespace SabreTools.Serialization.Writers
|
||||
IFileWriter<TModel>,
|
||||
IStreamWriter<TModel>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
#region IByteWriter
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace SabreTools.Serialization.Writers
|
||||
{
|
||||
public partial class XMID : IStringWriter<Data.Models.Xbox.XMID>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
/// <inheritdoc cref="IStringWriter.Serialize(T?)"/>
|
||||
public static string? SerializeString(Data.Models.Xbox.XMID? obj)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace SabreTools.Serialization.Writers
|
||||
{
|
||||
public partial class XeMID : IStringWriter<Data.Models.Xbox.XeMID>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Debug { get; set; } = false;
|
||||
|
||||
/// <inheritdoc cref="IStringWriter.Serialize(T?)"/>
|
||||
public static string? SerializeString(Data.Models.Xbox.XeMID? obj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user