mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Start implementing internal header processing
This commit is contained in:
@@ -112,6 +112,28 @@ namespace SabreTools.DatFiles
|
||||
|
||||
#region Instance Methods
|
||||
|
||||
#region Constructors
|
||||
|
||||
public DatHeader() { }
|
||||
|
||||
public DatHeader(Models.Metadata.Header header)
|
||||
{
|
||||
// Get all fields to automatically copy without processing
|
||||
var nonItemFields = TypeHelper.GetConstants(typeof(Models.Metadata.Header));
|
||||
if (nonItemFields == null)
|
||||
return;
|
||||
|
||||
// Populate the internal machine from non-filter fields
|
||||
_header = [];
|
||||
foreach (string fieldName in nonItemFields)
|
||||
{
|
||||
if (header.ContainsKey(fieldName))
|
||||
_header[fieldName] = header[fieldName];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Accessors
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user