mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add nullable context to SabreTools.DatItems
This change also starts migrating the internals of the DatItem formats to the new internal models. Right now, it's basically just acting like a wrapper around those models.
This commit is contained in:
@@ -17,10 +17,24 @@ namespace SabreTools.DatItems.Formats
|
||||
public class Original
|
||||
{
|
||||
[JsonProperty("value"), XmlElement("value")]
|
||||
public bool? Value { get; set; }
|
||||
public bool? Value
|
||||
{
|
||||
get => _original.ReadBool(Models.Internal.Original.ValueKey);
|
||||
set => _original[Models.Internal.Original.ValueKey] = value;
|
||||
}
|
||||
|
||||
[JsonProperty("content"), XmlElement("content")]
|
||||
public string Content { get; set; }
|
||||
public string? Content
|
||||
{
|
||||
get => _original.ReadString(Models.Internal.Original.ContentKey);
|
||||
set => _original[Models.Internal.Original.ContentKey] = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal Original model
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
private readonly Models.Internal.Original _original = new();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user