mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix issue with ModelBackedItem and headers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Xml.Serialization;
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.Core.Tools;
|
||||
|
||||
@@ -13,13 +14,13 @@ namespace SabreTools.Core
|
||||
/// Internal model wrapped by this DatItem
|
||||
/// </summary>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
protected Models.Metadata.DictionaryBase _internal;
|
||||
protected T _internal;
|
||||
|
||||
#region Constructors
|
||||
|
||||
public ModelBackedItem()
|
||||
{
|
||||
_internal = new DummyItem();
|
||||
_internal = (T)Activator.CreateInstance(typeof(T))!;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -148,14 +149,5 @@ namespace SabreTools.Core
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dummy Classes
|
||||
|
||||
/// <summary>
|
||||
/// Dummy item for use with the default constructor
|
||||
/// </summary>
|
||||
private class DummyItem : Models.Metadata.DictionaryBase { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user