diff --git a/Strings/XMID.Serializer.cs b/Strings/XMID.Serializer.cs
index 56605877..96e410d7 100644
--- a/Strings/XMID.Serializer.cs
+++ b/Strings/XMID.Serializer.cs
@@ -1,4 +1,4 @@
-using System;
+using System.Text;
using SabreTools.Serialization.Interfaces;
namespace SabreTools.Serialization.Strings
@@ -7,9 +7,22 @@ namespace SabreTools.Serialization.Strings
{
///
#if NET48
- public string Serialize(Models.Xbox.XMID obj) => throw new NotImplementedException();
+ public string Serialize(Models.Xbox.XMID obj)
#else
- public string? Serialize(Models.Xbox.XMID? obj) => throw new NotImplementedException();
+ public string? Serialize(Models.Xbox.XMID? obj)
#endif
+ {
+ if (obj == 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();
+ }
}
}
\ No newline at end of file
diff --git a/Strings/XeMID.Serializer.cs b/Strings/XeMID.Serializer.cs
index 235b5239..dc232c8a 100644
--- a/Strings/XeMID.Serializer.cs
+++ b/Strings/XeMID.Serializer.cs
@@ -1,4 +1,4 @@
-using System;
+using System.Text;
using SabreTools.Serialization.Interfaces;
namespace SabreTools.Serialization.Strings
@@ -7,9 +7,28 @@ namespace SabreTools.Serialization.Strings
{
///
#if NET48
- public string Serialize(Models.Xbox.XeMID obj) => throw new NotImplementedException();
+ public string Serialize(Models.Xbox.XeMID obj)
#else
- public string? Serialize(Models.Xbox.XeMID? obj) => throw new NotImplementedException();
+ public string? Serialize(Models.Xbox.XeMID? obj)
#endif
+ {
+ if (obj == null)
+ return null;
+
+ var sb = new StringBuilder();
+
+ sb.Append(obj.PublisherIdentifier);
+ sb.Append(obj.PlatformIdentifier);
+ sb.Append(obj.GameID);
+ sb.Append(obj.SKU);
+ sb.Append(obj.RegionIdentifier);
+ sb.Append(obj.BaseVersion);
+ sb.Append(obj.MediaSubtypeIdentifier);
+ sb.Append(obj.DiscNumberIdentifier);
+ if (!string.IsNullOrWhiteSpace(obj.CertificationSubmissionIdentifier))
+ sb.Append(obj.CertificationSubmissionIdentifier);
+
+ return sb.ToString();
+ }
}
}
\ No newline at end of file