Use CMPReader in CMP and DC

This commit is contained in:
Matt Nadareski
2020-06-15 12:41:39 -07:00
parent 099689a808
commit 6e12fa13eb
4 changed files with 300 additions and 370 deletions

View File

@@ -158,6 +158,11 @@ namespace SabreTools.Library.Readers
{
value = $"{linegc[++i].Replace("\"", string.Empty)} {linegc[++i].Replace("\"", string.Empty)}";
}
// Default case
else
{
value = linegc[++i].Replace("\"", string.Empty);
}
}
else
{
@@ -167,6 +172,13 @@ namespace SabreTools.Library.Readers
value = key;
key = "status";
}
// Special case for standalone sample
else if (normalizedValue == "sample")
{
value = key;
key = "name";
}
// Default case
else
{
value = linegc[++i].Replace("\"", string.Empty);
@@ -198,7 +210,7 @@ namespace SabreTools.Library.Readers
{
Internal = null;
InternalName = null;
RowType = CmpRowType.None;
RowType = CmpRowType.EndTopLevel;
Standalone = null;
TopLevel = null;
}