mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-23 22:59:48 +00:00
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.
57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
using System.IO;
|
|
using SabreTools.Data.Models.Logiqx;
|
|
|
|
namespace SabreTools.Serialization.Writers
|
|
{
|
|
public class Logiqx : XmlFile<Datafile>
|
|
{
|
|
#region Constants
|
|
|
|
/// <summary>
|
|
/// name field for DOCTYPE
|
|
/// </summary>
|
|
public const string DocTypeName = "datafile";
|
|
|
|
/// <summary>
|
|
/// pubid field for DOCTYPE
|
|
/// </summary>
|
|
public const string DocTypePubId = "-//Logiqx//DTD ROM Management Datafile//EN";
|
|
|
|
/// <summary>
|
|
/// sysid field for DOCTYPE
|
|
/// </summary>
|
|
public const string DocTypeSysId = "http://www.logiqx.com/Dats/datafile.dtd";
|
|
|
|
/// <summary>
|
|
/// subset field for DOCTYPE
|
|
/// </summary>
|
|
public const string? DocTypeSubset = null;
|
|
|
|
#endregion
|
|
|
|
#region IByteWriter
|
|
|
|
/// <inheritdoc cref="XmlFile.SerializeArray(T?, string?, string?, string?, string?)" />
|
|
public override byte[]? SerializeArray(Datafile? obj)
|
|
=> SerializeArray(obj, DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSysId);
|
|
|
|
#endregion
|
|
|
|
#region IFileWriter
|
|
|
|
/// <inheritdoc cref="XmlFile.Serialize(T?, string?, string?, string?, string?, string?)" />
|
|
public override bool SerializeFile(Datafile? obj, string? path)
|
|
=> Serialize(obj, path, DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSysId);
|
|
|
|
#endregion
|
|
|
|
#region IStreamWriter
|
|
|
|
/// <inheritdoc cref="XmlFile.Serialize(T?, string?, string?, string?, string?)" />
|
|
public override Stream? SerializeStream(Datafile? obj)
|
|
=> Serialize(obj, DocTypeName, DocTypePubId, DocTypeSysId, DocTypeSysId);
|
|
|
|
#endregion
|
|
}
|
|
}
|