mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Convert DAT format to a property
This commit is contained in:
@@ -17,11 +17,6 @@ namespace SabreTools.Metadata.DatFiles
|
||||
{
|
||||
#region Constants
|
||||
|
||||
/// <summary>
|
||||
/// Read or write format
|
||||
/// </summary>
|
||||
public const string DatFormatKey = "DATFORMAT";
|
||||
|
||||
/// <summary>
|
||||
/// External name of the DAT
|
||||
/// </summary>
|
||||
@@ -77,6 +72,11 @@ namespace SabreTools.Metadata.DatFiles
|
||||
set => _internal.Date = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read or write format
|
||||
/// </summary>
|
||||
public DatFormat? DatFormat { get; set; }
|
||||
|
||||
public string? DatVersion
|
||||
{
|
||||
get => _internal.DatVersion;
|
||||
@@ -299,7 +299,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
/// <summary>
|
||||
/// Clone the current header
|
||||
/// </summary>
|
||||
public object Clone() => new DatHeader(GetInternalClone());
|
||||
public object Clone() => new DatHeader(GetInternalClone()) { DatFormat = DatFormat };
|
||||
|
||||
/// <summary>
|
||||
/// Clone just the format from the current header
|
||||
@@ -308,7 +308,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
{
|
||||
var header = new DatHeader();
|
||||
|
||||
header.Write(DatFormatKey, Read<DatFormat>(DatFormatKey));
|
||||
header.DatFormat = DatFormat;
|
||||
|
||||
return header;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user