mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add override method to all required places
This commit is contained in:
@@ -511,9 +511,6 @@ namespace SabreTools.DatFiles
|
|||||||
/// Return list of required fields missing from a DatItem
|
/// Return list of required fields missing from a DatItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>List of missing required fields, null or empty if none were found</returns>
|
/// <returns>List of missing required fields, null or empty if none were found</returns>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Implement this in all relevant DatFile types
|
|
||||||
/// </remarks>
|
|
||||||
protected virtual List<DatItemField> GetMissingRequiredFields(DatItem datItem) => null;
|
protected virtual List<DatItemField> GetMissingRequiredFields(DatItem datItem) => null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a Archive.org file list
|
/// Represents parsing and writing of a Archive.org file list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class ArchiveDotOrg : DatFile
|
internal class ArchiveDotOrg : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -268,6 +265,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
using SabreTools.DatItems.Formats;
|
using SabreTools.DatItems.Formats;
|
||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of an AttractMode DAT
|
/// Represents parsing and writing of an AttractMode DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class AttractMode : DatFile
|
internal class AttractMode : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -115,6 +112,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a ClrMamePro DAT
|
/// Represents parsing and writing of a ClrMamePro DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class ClrMamePro : DatFile
|
internal class ClrMamePro : DatFile
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
@@ -436,6 +433,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -17,9 +16,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a DosCenter DAT
|
/// Represents parsing and writing of a DosCenter DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class DosCenter : DatFile
|
internal class DosCenter : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -262,6 +258,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of an Everdrive SMDB file
|
/// Represents parsing and writing of an Everdrive SMDB file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class EverdriveSMDB : DatFile
|
internal class EverdriveSMDB : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -112,6 +109,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -14,9 +14,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a MAME Listrom DAT
|
/// Represents parsing and writing of a MAME Listrom DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class Listrom : DatFile
|
internal class Listrom : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -261,6 +258,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Disk, ItemType.Rom };
|
return new ItemType[] { ItemType.Disk, ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -1349,6 +1348,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System.Text;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -18,9 +17,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a Logiqx-derived DAT
|
/// Represents parsing and writing of a Logiqx-derived DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class Logiqx : DatFile
|
internal class Logiqx : DatFile
|
||||||
{
|
{
|
||||||
// Private instance variables specific to Logiqx DATs
|
// Private instance variables specific to Logiqx DATs
|
||||||
@@ -776,6 +772,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
|
|
||||||
@@ -10,9 +10,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a Missfile
|
/// Represents parsing and writing of a Missfile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class Missfile : DatFile
|
internal class Missfile : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -31,6 +28,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -16,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of an OfflineList XML DAT
|
/// Represents parsing and writing of an OfflineList XML DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class OfflineList : DatFile
|
internal class OfflineList : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -665,6 +661,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -16,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a openMSX softawre list XML DAT
|
/// Represents parsing and writing of a openMSX softawre list XML DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class OpenMSX : DatFile
|
internal class OpenMSX : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -538,6 +534,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -15,9 +14,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a RomCenter DAT
|
/// Represents parsing and writing of a RomCenter DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class RomCenter : DatFile
|
internal class RomCenter : DatFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -367,6 +363,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Rom };
|
return new ItemType[] { ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Newtonsoft.Json.Serialization;
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
using SabreTools.DatItems.Formats;
|
using SabreTools.DatItems.Formats;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Newtonsoft.Json.Serialization;
|
|
||||||
|
|
||||||
namespace SabreTools.DatFiles.Formats
|
namespace SabreTools.DatFiles.Formats
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.Text;
|
|||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -15,9 +15,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents parsing and writing of a value-separated DAT
|
/// Represents parsing and writing of a value-separated DAT
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
|
||||||
/// TODO: Check and enforce required fields in output
|
|
||||||
/// </remarks>
|
|
||||||
internal class SeparatedValue : DatFile
|
internal class SeparatedValue : DatFile
|
||||||
{
|
{
|
||||||
// Private instance variables specific to Separated Value DATs
|
// Private instance variables specific to Separated Value DATs
|
||||||
@@ -98,6 +95,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
return new ItemType[] { ItemType.Disk, ItemType.Media, ItemType.Rom };
|
return new ItemType[] { ItemType.Disk, ItemType.Media, ItemType.Rom };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Schema;
|
using System.Xml.Schema;
|
||||||
|
|
||||||
using SabreTools.Core;
|
using SabreTools.Core;
|
||||||
using SabreTools.Core.Tools;
|
using SabreTools.Core.Tools;
|
||||||
using SabreTools.DatItems;
|
using SabreTools.DatItems;
|
||||||
@@ -26,6 +25,9 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// DTD for original MAME Software List DATs
|
/// DTD for original MAME Software List DATs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// TODO: See if there's an updated DTD and then check for required fields
|
||||||
|
/// </remarks>
|
||||||
private const string SoftwareListDTD = @"<!ELEMENT softwarelist (software+)>
|
private const string SoftwareListDTD = @"<!ELEMENT softwarelist (software+)>
|
||||||
<!ATTLIST softwarelist name CDATA #REQUIRED>
|
<!ATTLIST softwarelist name CDATA #REQUIRED>
|
||||||
<!ATTLIST softwarelist description CDATA #IMPLIED>
|
<!ATTLIST softwarelist description CDATA #IMPLIED>
|
||||||
@@ -585,6 +587,13 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override List<DatItemField> GetMissingRequiredFields(DatItem datItem)
|
||||||
|
{
|
||||||
|
// TODO: Check required fields
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
public override bool WriteToFile(string outfile, bool ignoreblanks = false, bool throwOnError = false)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user