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

34 lines
885 B
C#

using System.Text;
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)
{
var deserializer = new XMID();
return deserializer.Serialize(obj);
}
/// <inheritdoc/>
public string? Serialize(Data.Models.Xbox.XMID? obj)
{
if (obj is null)
return null;
var sb = new StringBuilder();
sb.Append(obj.PublisherIdentifier);
sb.Append(obj.GameID);
sb.Append(obj.VersionNumber);
sb.Append(obj.RegionIdentifier);
return sb.ToString();
}
}
}