diff --git a/RombaSharp/Features/Archive.cs b/RombaSharp/Features/Archive.cs index 7986853a..b902604d 100644 --- a/RombaSharp/Features/Archive.cs +++ b/RombaSharp/Features/Archive.cs @@ -26,7 +26,7 @@ Unpacked files will be stored as individual entries. Prior to unpacking a zip file, the external SHA1 is checked against the DAT index. If -only-needed is set, only those files are put in the ROM archive that have a current entry in the DAT index."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(OnlyNeededFlag); AddFeature(ResumeStringInput); @@ -39,7 +39,7 @@ have a current entry in the DAT index."; AddFeature(NoDbFlag); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/RombaSharp/Features/BaseFeature.cs b/RombaSharp/Features/BaseFeature.cs index 25d975e8..9c1b1c28 100644 --- a/RombaSharp/Features/BaseFeature.cs +++ b/RombaSharp/Features/BaseFeature.cs @@ -19,11 +19,11 @@ namespace RombaSharp.Features #region Private Flag features internal const string CopyValue = "copy"; - internal static Feature CopyFlag + internal static SabreTools.Library.Help.Feature CopyFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( CopyValue, "-copy", "Copy files to output instead of rebuilding", @@ -32,11 +32,11 @@ namespace RombaSharp.Features } // Unique to RombaSharp internal const string FixdatOnlyValue = "fixdat-only"; - internal static Feature FixdatOnlyFlag + internal static SabreTools.Library.Help.Feature FixdatOnlyFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( FixdatOnlyValue, "-fixdatOnly", "only fix dats and don't generate torrentzips", @@ -45,11 +45,11 @@ namespace RombaSharp.Features } internal const string LogOnlyValue = "log-only"; - internal static Feature LogOnlyFlag + internal static SabreTools.Library.Help.Feature LogOnlyFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( LogOnlyValue, "-log-only", "Only write out actions to log", @@ -58,11 +58,11 @@ namespace RombaSharp.Features } internal const string NoDbValue = "no-db"; - internal static Feature NoDbFlag + internal static SabreTools.Library.Help.Feature NoDbFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( NoDbValue, "-no-db", "archive into depot but do not touch DB index and ignore only-needed flag", @@ -71,11 +71,11 @@ namespace RombaSharp.Features } internal const string OnlyNeededValue = "only-needed"; - internal static Feature OnlyNeededFlag + internal static SabreTools.Library.Help.Feature OnlyNeededFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( OnlyNeededValue, "-only-needed", "only archive ROM files actually referenced by DAT files from the DAT index", @@ -84,11 +84,11 @@ namespace RombaSharp.Features } internal const string SkipInitialScanValue = "skip-initial-scan"; - internal static Feature SkipInitialScanFlag + internal static SabreTools.Library.Help.Feature SkipInitialScanFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( SkipInitialScanValue, "-skip-initial-scan", "skip the initial scan of the files to determine amount of work", @@ -97,11 +97,11 @@ namespace RombaSharp.Features } internal const string UseGolangZipValue = "use-golang-zip"; - internal static Feature UseGolangZipFlag + internal static SabreTools.Library.Help.Feature UseGolangZipFlag { get { - return new Feature( + return new SabreTools.Library.Help.Feature( UseGolangZipValue, "-use-golang-zip", "use go zip implementation instead of zlib", @@ -114,11 +114,11 @@ namespace RombaSharp.Features #region Private Int32 features internal const string Include7ZipsInt32Value = "include-7zips"; - internal static Feature Include7ZipsInt32Input + internal static SabreTools.Library.Help.Feature Include7ZipsInt32Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( Include7ZipsInt32Value, "-include-7zips", "flag value == 0 means: add 7zip files themselves into the depot in addition to their contents, flag value == 2 means add 7zip files themselves but don't add content", @@ -127,11 +127,11 @@ namespace RombaSharp.Features } internal const string IncludeGZipsInt32Value = "include-gzips"; - internal static Feature IncludeGZipsInt32Input + internal static SabreTools.Library.Help.Feature IncludeGZipsInt32Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( IncludeGZipsInt32Value, "-include-gzips", "flag value == 0 means: add gzip files themselves into the depot in addition to their contents, flag value == 2 means add gzip files themselves but don't add content", @@ -140,11 +140,11 @@ namespace RombaSharp.Features } internal const string IncludeZipsInt32Value = "include-zips"; - internal static Feature IncludeZipsInt32Input + internal static SabreTools.Library.Help.Feature IncludeZipsInt32Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( IncludeZipsInt32Value, "-include-zips", "flag value == 0 means: add zip files themselves into the depot in addition to their contents, flag value == 2 means add zip files themselves but don't add content", @@ -153,11 +153,11 @@ namespace RombaSharp.Features } internal const string SubworkersInt32Value = "subworkers"; - internal static Feature SubworkersInt32Input + internal static SabreTools.Library.Help.Feature SubworkersInt32Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( SubworkersInt32Value, "-subworkers", "how many subworkers to launch for each worker", @@ -166,11 +166,11 @@ namespace RombaSharp.Features } // Defaults to Workers count in config internal const string WorkersInt32Value = "workers"; - internal static Feature WorkersInt32Input + internal static SabreTools.Library.Help.Feature WorkersInt32Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( WorkersInt32Value, "-workers", "how many workers to launch for the job", @@ -183,11 +183,11 @@ namespace RombaSharp.Features #region Private Int64 features internal const string SizeInt64Value = "size"; - internal static Feature SizeInt64Input + internal static SabreTools.Library.Help.Feature SizeInt64Input { get { - return new Feature( + return new SabreTools.Library.Help.Feature( SizeInt64Value, "-size", "size of the rom to lookup", @@ -200,11 +200,11 @@ namespace RombaSharp.Features #region Private List features internal const string DatsListStringValue = "dats"; - internal static Feature DatsListStringInput + internal static SabreTools.Library.Help.Feature DatsListStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( DatsListStringValue, "-dats", "purge only roms declared in these dats", @@ -213,11 +213,11 @@ namespace RombaSharp.Features } internal const string DepotListStringValue = "depot"; - internal static Feature DepotListStringInput + internal static SabreTools.Library.Help.Feature DepotListStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( DepotListStringValue, "-depot", "work only on specified depot path", @@ -230,11 +230,11 @@ namespace RombaSharp.Features #region Private String features internal const string BackupStringValue = "backup"; - internal static Feature BackupStringInput + internal static SabreTools.Library.Help.Feature BackupStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( BackupStringValue, "-backup", "backup directory where backup files are moved to", @@ -243,11 +243,11 @@ namespace RombaSharp.Features } internal const string DescriptionStringValue = "description"; - internal static Feature DescriptionStringInput + internal static SabreTools.Library.Help.Feature DescriptionStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( DescriptionStringValue, "-description", "description value in DAT header", @@ -256,11 +256,11 @@ namespace RombaSharp.Features } internal const string MissingSha1sStringValue = "missing-sha1s"; - internal static Feature MissingSha1sStringInput + internal static SabreTools.Library.Help.Feature MissingSha1sStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( MissingSha1sStringValue, "-missingSha1s", "write paths of dats with missing sha1s into this file", @@ -269,11 +269,11 @@ namespace RombaSharp.Features } internal const string NameStringValue = "name"; - internal static Feature NameStringInput + internal static SabreTools.Library.Help.Feature NameStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( NameStringValue, "-name", "name value in DAT header", @@ -282,11 +282,11 @@ namespace RombaSharp.Features } internal const string NewStringValue = "new"; - internal static Feature NewStringInput + internal static SabreTools.Library.Help.Feature NewStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( NewStringValue, "-new", "new DAT file", @@ -295,11 +295,11 @@ namespace RombaSharp.Features } internal const string OldStringValue = "old"; - internal static Feature OldStringInput + internal static SabreTools.Library.Help.Feature OldStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( OldStringValue, "-old", "old DAT file", @@ -308,11 +308,11 @@ namespace RombaSharp.Features } internal const string OutStringValue = "out"; - internal static Feature OutStringInput + internal static SabreTools.Library.Help.Feature OutStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( OutStringValue, "-out", "output file", @@ -321,11 +321,11 @@ namespace RombaSharp.Features } internal const string ResumeStringValue = "resume"; - internal static Feature ResumeStringInput + internal static SabreTools.Library.Help.Feature ResumeStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( ResumeStringValue, "-resume", "resume a previously interrupted operation from the specified path", @@ -334,11 +334,11 @@ namespace RombaSharp.Features } internal const string SourceStringValue = "source"; - internal static Feature SourceStringInput + internal static SabreTools.Library.Help.Feature SourceStringInput { get { - return new Feature( + return new SabreTools.Library.Help.Feature( SourceStringValue, "-source", "source directory", @@ -370,7 +370,7 @@ namespace RombaSharp.Features internal const string _dbSchema = "rombasharp"; internal static string _connectionString; - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { InitializeConfiguration(); DatabaseTools.EnsureDatabase(_dbSchema, _db, _connectionString); diff --git a/RombaSharp/Features/RefreshDats.cs b/RombaSharp/Features/RefreshDats.cs index 0de46b8a..94149a54 100644 --- a/RombaSharp/Features/RefreshDats.cs +++ b/RombaSharp/Features/RefreshDats.cs @@ -24,13 +24,13 @@ namespace RombaSharp.Features Detects any changes in the DAT master directory tree and updates the DAT index accordingly, marking deleted or overwritten dats as orphaned and updating contents of any changed dats."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(WorkersInt32Input); AddFeature(MissingSha1sStringInput); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/RombaSharp/Features/RescanDepots.cs b/RombaSharp/Features/RescanDepots.cs index bcba7896..f30bcb36 100644 --- a/RombaSharp/Features/RescanDepots.cs +++ b/RombaSharp/Features/RescanDepots.cs @@ -21,10 +21,10 @@ namespace RombaSharp.Features Description = "Rescan a specific depot to get new information"; _featureType = FeatureType.Flag; LongDescription = "Rescan a specific depot to get new information"; - Features = new Dictionary(); + Features = new Dictionary(); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); Globals.Logger.Error("This feature is not yet implemented: rescan-depots"); diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index b09ec9ad..4e103773 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -1441,17 +1441,18 @@ namespace SabreTools.Library.DatFiles if (slotoptions) { // If the game has no slot options, we continue - if (Items[game][0].Machine.Slots == null - || Items[game][0].Machine.Slots - .SelectMany(s => s.SlotOptions ?? new List()).Count() == 0) + if (Items[game] + .Where(i => i.ItemType == ItemType.Slot) + .SelectMany(s => (s as Slot).SlotOptions ?? new List()).Count() == 0) { continue; } // Determine if the game has any slot options or not - List slotOptions = Items[game][0].Machine.Slots - .Where(s => s.SlotOptions != null && s.SlotOptions.Count != 0) - .SelectMany(s => s.SlotOptions) + List slotOptions = Items[game] + .Where(i => i.ItemType == ItemType.Slot) + .Where(s => (s as Slot).SlotOptions != null && (s as Slot).SlotOptions.Count != 0) + .SelectMany(s => (s as Slot).SlotOptions) .Select(o => o.DeviceName) .Distinct() .ToList(); @@ -1465,18 +1466,15 @@ namespace SabreTools.Library.DatFiles // Otherwise, copy the items from the slot option to the current game DatItem copyFrom = Items[game][0]; List slotOptionItems = Items[slotOption]; + newSlotOptions.AddRange((Items[slotOption] ?? new List()) + .Where(i => i.ItemType == ItemType.Slot) + .Where(s => (s as Slot).SlotOptions != null && (s as Slot).SlotOptions.Count != 0) + .SelectMany(s => (s as Slot).SlotOptions) + .Select(o => o.DeviceName)); + foreach (DatItem item in slotOptionItems) { DatItem datItem = (DatItem)item.Clone(); - List machineSlotOptions = - (datItem.Machine.Slots ?? new List()) - .Where(s => s.SlotOptions != null && s.SlotOptions.Count != 0) - .SelectMany(s => s.SlotOptions) - .Select(o => o.DeviceName) - .Distinct() - .ToList(); - - newSlotOptions.AddRange(machineSlotOptions); datItem.CopyMachineInformation(copyFrom); if (Items[game].Where(i => i.ItemType == datItem.ItemType && i.Name == datItem.Name).Count() == 0) { @@ -1493,7 +1491,7 @@ namespace SabreTools.Library.DatFiles foreach (string slotOption in newSlotOptions) { if (!slotOptions.Contains(slotOption)) - Items[game][0].Machine.Slots.Add(new ListXmlSlot() { SlotOptions = new List { new ListXmlSlotOption { DeviceName = slotOption } } }); + Items[game].Add(new Slot() { SlotOptions = new List { new SlotOption { DeviceName = slotOption } } }); } } } diff --git a/SabreTools.Library/DatFiles/ItemDictionary.cs b/SabreTools.Library/DatFiles/ItemDictionary.cs index 92bf0a4b..ba6d5945 100644 --- a/SabreTools.Library/DatFiles/ItemDictionary.cs +++ b/SabreTools.Library/DatFiles/ItemDictionary.cs @@ -155,6 +155,12 @@ namespace SabreTools.Library.DatFiles [JsonIgnore] public long SampleCount { get; private set; } = 0; + /// + /// Number of Slot items + /// + [JsonIgnore] + public long SlotCount { get; private set; } = 0; + /// /// Number of SoftwareList items /// @@ -558,6 +564,9 @@ namespace SabreTools.Library.DatFiles case ItemType.Sample: SampleCount++; break; + case ItemType.Slot: + SlotCount++; + break; case ItemType.SoftwareList: SoftwareListCount++; break; @@ -705,6 +714,9 @@ namespace SabreTools.Library.DatFiles case ItemType.Sample: SampleCount--; break; + case ItemType.Slot: + SlotCount--; + break; case ItemType.SoftwareList: SoftwareListCount--; break; diff --git a/SabreTools.Library/DatFiles/Json.cs b/SabreTools.Library/DatFiles/Json.cs index bda51aa2..1dd426e8 100644 --- a/SabreTools.Library/DatFiles/Json.cs +++ b/SabreTools.Library/DatFiles/Json.cs @@ -250,6 +250,9 @@ namespace SabreTools.Library.DatFiles case ItemType.Sample: datItem = datItemObj.ToObject(); break; + case ItemType.Slot: + datItem = datItemObj.ToObject(); + break; case ItemType.SoftwareList: datItem = datItemObj.ToObject(); break; diff --git a/SabreTools.Library/DatFiles/Listxml.cs b/SabreTools.Library/DatFiles/Listxml.cs index 633734df..5dc6026f 100644 --- a/SabreTools.Library/DatFiles/Listxml.cs +++ b/SabreTools.Library/DatFiles/Listxml.cs @@ -171,7 +171,7 @@ namespace SabreTools.Library.DatFiles { Name = reader.GetAttribute("name"), Default = reader.GetAttribute("default").AsYesNo(), - Conditions = new List(), + Conditions = new List(), }; // Now read the internal tags @@ -224,9 +224,9 @@ namespace SabreTools.Library.DatFiles Name = reader.GetAttribute("name"), Tag = reader.GetAttribute("tag"), Mask = reader.GetAttribute("mask"), - Conditions = new List(), - Locations = new List(), - Settings = new List(), + Conditions = new List(), + Locations = new List(), + Settings = new List(), }; // Now read the internal tags @@ -253,14 +253,16 @@ namespace SabreTools.Library.DatFiles Name = reader.GetAttribute("name"), Tag = reader.GetAttribute("tag"), Mask = reader.GetAttribute("mask"), - Conditions = new List(), - Locations = new List(), - Values = new List(), + Conditions = new List(), + Locations = new List(), + Values = new List(), }; // Now read the internal tags ReadDipSwitch(reader.ReadSubtree(), dipSwitch); + datItems.Add(dipSwitch); + // Skip the dipswitch now that we've processed it reader.Skip(); break; @@ -336,6 +338,22 @@ namespace SabreTools.Library.DatFiles reader.Read(); break; + case "slot": + var slot = new Slot + { + Name = reader.GetAttribute("name"), + SlotOptions = new List(), + }; + + // Now read the internal tags + ReadSlot(reader.ReadSubtree(), slot); + + datItems.Add(slot); + + // Skip the slot now that we've processed it + reader.Skip(); + break; + case "softwarelist": datItems.Add(new DatItems.SoftwareList { @@ -355,7 +373,7 @@ namespace SabreTools.Library.DatFiles break; case "display": - var display = new ListXmlDisplay(); + var display = new Display(); display.Tag = reader.GetAttribute("tag"); display.Type = reader.GetAttribute("type"); display.Rotate = reader.GetAttribute("rotate"); @@ -373,7 +391,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Displays == null) - machine.Displays = new List(); + machine.Displays = new List(); machine.Displays.Add(display); @@ -381,12 +399,12 @@ namespace SabreTools.Library.DatFiles break; case "sound": - var sound = new ListXmlSound(); + var sound = new Sound(); sound.Channels = reader.GetAttribute("channels"); // Ensure the list exists if (machine.Sounds == null) - machine.Sounds = new List(); + machine.Sounds = new List(); machine.Sounds.Add(sound); @@ -394,7 +412,7 @@ namespace SabreTools.Library.DatFiles break; case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -402,7 +420,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Conditions == null) - machine.Conditions = new List(); + machine.Conditions = new List(); machine.Conditions.Add(condition); @@ -410,7 +428,7 @@ namespace SabreTools.Library.DatFiles break; case "input": - var input = new ListXmlInput(); + var input = new Input(); input.Service = reader.GetAttribute("service").AsYesNo(); input.Tilt = reader.GetAttribute("tilt").AsYesNo(); input.Players = reader.GetAttribute("players"); @@ -421,7 +439,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Inputs == null) - machine.Inputs = new List(); + machine.Inputs = new List(); machine.Inputs.Add(input); @@ -430,7 +448,7 @@ namespace SabreTools.Library.DatFiles break; case "port": - var port = new ListXmlPort(); + var port = new Port(); port.Tag = reader.GetAttribute("tag"); // Now read the internal tags @@ -438,7 +456,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Ports == null) - machine.Ports = new List(); + machine.Ports = new List(); machine.Ports.Add(port); @@ -447,7 +465,7 @@ namespace SabreTools.Library.DatFiles break; case "driver": - var driver = new ListXmlDriver(); + var driver = new Driver(); driver.Status = reader.GetAttribute("status"); driver.Emulation = reader.GetAttribute("emulation"); driver.Cocktail = reader.GetAttribute("cocktail"); @@ -455,7 +473,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Drivers == null) - machine.Drivers = new List(); + machine.Drivers = new List(); machine.Drivers.Add(driver); @@ -463,14 +481,14 @@ namespace SabreTools.Library.DatFiles break; case "feature": - var feature = new ListXmlFeature(); + var feature = new Feature(); feature.Type = reader.GetAttribute("type"); feature.Status = reader.GetAttribute("status"); feature.Overall = reader.GetAttribute("overall"); // Ensure the list exists if (machine.Features == null) - machine.Features = new List(); + machine.Features = new List(); machine.Features.Add(feature); @@ -478,7 +496,7 @@ namespace SabreTools.Library.DatFiles break; case "device": - var device = new ListXmlDevice(); + var device = new Device(); device.Type = reader.GetAttribute("type"); device.Tag = reader.GetAttribute("tag"); device.FixedImage = reader.GetAttribute("fixed_image"); @@ -490,7 +508,7 @@ namespace SabreTools.Library.DatFiles // Ensure the list exists if (machine.Devices == null) - machine.Devices = new List(); + machine.Devices = new List(); machine.Devices.Add(device); @@ -498,23 +516,6 @@ namespace SabreTools.Library.DatFiles reader.Skip(); break; - case "slot": - var slot = new ListXmlSlot(); - slot.Name = reader.GetAttribute("name"); - - // Now read the internal tags - ReadSlot(reader.ReadSubtree(), slot); - - // Ensure the list exists - if (machine.Slots == null) - machine.Slots = new List(); - - machine.Slots.Add(slot); - - // Skip the slot now that we've processed it - reader.Skip(); - break; - default: reader.Read(); break; @@ -555,14 +556,14 @@ namespace SabreTools.Library.DatFiles /// /// XmlReader representing a machine block /// ListXmlSlot to populate - private void ReadSlot(XmlReader reader, ListXmlSlot slot) + private void ReadSlot(XmlReader reader, Slot slot) { // If we have an empty machine, skip it if (reader == null) return; // Get list ready - slot.SlotOptions = new List(); + slot.SlotOptions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -580,7 +581,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "slotoption": - var slotOption = new ListXmlSlotOption(); + var slotOption = new SlotOption(); slotOption.Name = reader.GetAttribute("name"); slotOption.DeviceName = reader.GetAttribute("devname"); slotOption.Default = reader.GetAttribute("default").AsYesNo(); @@ -602,14 +603,14 @@ namespace SabreTools.Library.DatFiles /// /// XmlReader representing a diskarea block /// ListXmlInput to populate - private void ReadInput(XmlReader reader, ListXmlInput input) + private void ReadInput(XmlReader reader, Input input) { // If we have an empty input, skip it if (reader == null) return; // Get list ready - input.Controls = new List(); + input.Controls = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -627,7 +628,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "control": - var control = new ListXmlControl(); + var control = new Control(); control.Type = reader.GetAttribute("type"); control.Player = reader.GetAttribute("player"); control.Buttons = reader.GetAttribute("buttons"); @@ -665,9 +666,9 @@ namespace SabreTools.Library.DatFiles return; // Get lists ready - dipSwitch.Conditions = new List(); - dipSwitch.Locations = new List(); - dipSwitch.Values = new List(); + dipSwitch.Conditions = new List(); + dipSwitch.Locations = new List(); + dipSwitch.Values = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -685,7 +686,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -697,7 +698,7 @@ namespace SabreTools.Library.DatFiles break; case "diplocation": - var dipLocation = new ListXmlDipLocation(); + var dipLocation = new Location(); dipLocation.Name = reader.GetAttribute("name"); dipLocation.Number = reader.GetAttribute("number"); dipLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); @@ -708,7 +709,7 @@ namespace SabreTools.Library.DatFiles break; case "dipvalue": - var dipValue = new ListXmlDipValue(); + var dipValue = new Setting(); dipValue.Name = reader.GetAttribute("name"); dipValue.Value = reader.GetAttribute("value"); dipValue.Default = reader.GetAttribute("default").AsYesNo(); @@ -733,15 +734,15 @@ namespace SabreTools.Library.DatFiles /// Read DipValue information /// /// XmlReader representing a diskarea block - /// ListXmlDipValue to populate - private void ReadDipValue(XmlReader reader, ListXmlDipValue dipValue) + /// Setting to populate + private void ReadDipValue(XmlReader reader, Setting dipValue) { // If we have an empty dipvalue, skip it if (reader == null) return; // Get list ready - dipValue.Conditions = new List(); + dipValue.Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -759,7 +760,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -789,9 +790,9 @@ namespace SabreTools.Library.DatFiles return; // Get lists ready - configuration.Conditions = new List(); - configuration.Locations = new List(); - configuration.Settings = new List(); + configuration.Conditions = new List(); + configuration.Locations = new List(); + configuration.Settings = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -809,7 +810,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -821,7 +822,7 @@ namespace SabreTools.Library.DatFiles break; case "conflocation": - var confLocation = new ListXmlConfLocation(); + var confLocation = new Location(); confLocation.Name = reader.GetAttribute("name"); confLocation.Number = reader.GetAttribute("number"); confLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); @@ -832,7 +833,7 @@ namespace SabreTools.Library.DatFiles break; case "confsetting": - var confSetting = new ListXmlConfSetting(); + var confSetting = new Setting(); confSetting.Name = reader.GetAttribute("name"); confSetting.Value = reader.GetAttribute("value"); confSetting.Default = reader.GetAttribute("default").AsYesNo(); @@ -857,15 +858,15 @@ namespace SabreTools.Library.DatFiles /// Read ConfSetting information /// /// XmlReader representing a diskarea block - /// ListXmlConfSetting to populate - private void ReadConfSetting(XmlReader reader, ListXmlConfSetting confSetting) + /// Setting to populate + private void ReadConfSetting(XmlReader reader, Setting confSetting) { // If we have an empty confsetting, skip it if (reader == null) return; // Get list ready - confSetting.Conditions = new List(); + confSetting.Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -883,7 +884,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -906,14 +907,14 @@ namespace SabreTools.Library.DatFiles /// /// XmlReader representing a diskarea block /// ListXmlPort to populate - private void ReadPort(XmlReader reader, ListXmlPort port) + private void ReadPort(XmlReader reader, Port port) { // If we have an empty port, skip it if (reader == null) return; // Get list ready - port.Analogs = new List(); + port.Analogs = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -931,7 +932,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "analog": - var analog = new ListXmlAnalog(); + var analog = new Analog(); analog.Mask = reader.GetAttribute("mask"); port.Analogs.Add(analog); @@ -958,7 +959,7 @@ namespace SabreTools.Library.DatFiles return; // Get list ready - adjuster.Conditions = new List(); + adjuster.Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -976,7 +977,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -999,15 +1000,15 @@ namespace SabreTools.Library.DatFiles /// /// XmlReader representing a diskarea block /// ListXmlDevice to populate - private void ReadDevice(XmlReader reader, ListXmlDevice device) + private void ReadDevice(XmlReader reader, Device device) { // If we have an empty port, skip it if (reader == null) return; // Get lists ready - device.Instances = new List(); - device.Extensions = new List(); + device.Instances = new List(); + device.Extensions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -1025,7 +1026,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "instance": - var instance = new ListXmlInstance(); + var instance = new Instance(); instance.Name = reader.GetAttribute("name"); instance.BriefName = reader.GetAttribute("briefname"); @@ -1035,7 +1036,7 @@ namespace SabreTools.Library.DatFiles break; case "extension": - var extension = new ListXmlExtension(); + var extension = new Extension(); extension.Name = reader.GetAttribute("name"); device.Extensions.Add(extension); @@ -1384,33 +1385,6 @@ namespace SabreTools.Library.DatFiles xtw.WriteEndElement(); } } - if (datItem.Machine.Slots != null) - { - foreach (var slot in datItem.Machine.Slots) - { - xtw.WriteStartElement("slot"); - - xtw.WriteOptionalAttributeString("name", slot.Name); - - if (slot.SlotOptions != null) - { - foreach (var slotOption in slot.SlotOptions) - { - xtw.WriteStartElement("slotoption"); - - xtw.WriteOptionalAttributeString("name", slotOption.Name); - xtw.WriteOptionalAttributeString("devname", slotOption.DeviceName); - xtw.WriteOptionalAttributeString("default", slotOption.Default.FromYesNo()); - - // End slotoption - xtw.WriteEndElement(); - } - } - - // End slot - xtw.WriteEndElement(); - } - } xtw.Flush(); } @@ -1651,6 +1625,24 @@ namespace SabreTools.Library.DatFiles xtw.WriteEndElement(); break; + case ItemType.Slot: + var slot = datItem as Slot; + xtw.WriteStartElement("slot"); + xtw.WriteOptionalAttributeString("name", slot.Name); + if (slot.SlotOptions != null) + { + foreach (var slotOption in slot.SlotOptions) + { + xtw.WriteStartElement("slotoption"); + xtw.WriteOptionalAttributeString("name", slotOption.Name); + xtw.WriteOptionalAttributeString("devname", slotOption.DeviceName); + xtw.WriteOptionalAttributeString("default", slotOption.Default.FromYesNo()); + xtw.WriteEndElement(); + } + } + xtw.WriteEndElement(); + break; + case ItemType.SoftwareList: var softwareList = datItem as DatItems.SoftwareList; xtw.WriteStartElement("softwarelist"); diff --git a/SabreTools.Library/DatFiles/SabreDat.cs b/SabreTools.Library/DatFiles/SabreDat.cs index b3706e74..ca34541d 100644 --- a/SabreTools.Library/DatFiles/SabreDat.cs +++ b/SabreTools.Library/DatFiles/SabreDat.cs @@ -356,7 +356,7 @@ namespace SabreTools.Library.DatFiles { Name = reader.GetAttribute("name"), Default = reader.GetAttribute("default").AsYesNo(), - Conditions = new List(), + Conditions = new List(), }; // Now read the internal tags @@ -416,9 +416,9 @@ namespace SabreTools.Library.DatFiles Name = reader.GetAttribute("name"), Tag = reader.GetAttribute("tag"), Mask = reader.GetAttribute("mask"), - Conditions = new List(), - Locations = new List(), - Settings = new List(), + Conditions = new List(), + Locations = new List(), + Settings = new List(), }; // Now read the internal tags @@ -443,9 +443,9 @@ namespace SabreTools.Library.DatFiles Name = reader.GetAttribute("name"), Tag = reader.GetAttribute("tag"), Mask = reader.GetAttribute("mask"), - Conditions = new List(), - Locations = new List(), - Values = new List(), + Conditions = new List(), + Locations = new List(), + Values = new List(), }; // Now read the internal tags @@ -643,7 +643,7 @@ namespace SabreTools.Library.DatFiles return; // Get list ready - (adjuster as Adjuster).Conditions = new List(); + (adjuster as Adjuster).Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -661,7 +661,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -695,9 +695,9 @@ namespace SabreTools.Library.DatFiles return; // Get lists ready - (configuration as Configuration).Conditions = new List(); - (configuration as Configuration).Locations = new List(); - (configuration as Configuration).Settings = new List(); + (configuration as Configuration).Conditions = new List(); + (configuration as Configuration).Locations = new List(); + (configuration as Configuration).Settings = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -715,7 +715,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -727,7 +727,7 @@ namespace SabreTools.Library.DatFiles break; case "conflocation": - var confLocation = new ListXmlConfLocation(); + var confLocation = new Location(); confLocation.Name = reader.GetAttribute("name"); confLocation.Number = reader.GetAttribute("number"); confLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); @@ -738,7 +738,7 @@ namespace SabreTools.Library.DatFiles break; case "confsetting": - var confSetting = new ListXmlConfSetting(); + var confSetting = new Setting(); confSetting.Name = reader.GetAttribute("name"); confSetting.Value = reader.GetAttribute("value"); confSetting.Default = reader.GetAttribute("default").AsYesNo(); @@ -764,14 +764,14 @@ namespace SabreTools.Library.DatFiles /// /// XmlReader representing a diskarea block /// ListXmlConfSetting to populate - private void ReadConfSetting(XmlReader reader, ListXmlConfSetting confSetting) + private void ReadConfSetting(XmlReader reader, Setting confSetting) { // If we have an empty confsetting, skip it if (reader == null) return; // Get list ready - confSetting.Conditions = new List(); + confSetting.Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -789,7 +789,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -823,9 +823,9 @@ namespace SabreTools.Library.DatFiles return; // Get lists ready - (dipSwitch as DipSwitch).Conditions = new List(); - (dipSwitch as DipSwitch).Locations = new List(); - (dipSwitch as DipSwitch).Values = new List(); + (dipSwitch as DipSwitch).Conditions = new List(); + (dipSwitch as DipSwitch).Locations = new List(); + (dipSwitch as DipSwitch).Values = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -843,7 +843,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -855,7 +855,7 @@ namespace SabreTools.Library.DatFiles break; case "diplocation": - var dipLocation = new ListXmlDipLocation(); + var dipLocation = new Location(); dipLocation.Name = reader.GetAttribute("name"); dipLocation.Number = reader.GetAttribute("number"); dipLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); @@ -866,7 +866,7 @@ namespace SabreTools.Library.DatFiles break; case "dipvalue": - var dipValue = new ListXmlDipValue(); + var dipValue = new Setting(); dipValue.Name = reader.GetAttribute("name"); dipValue.Value = reader.GetAttribute("value"); dipValue.Default = reader.GetAttribute("default").AsYesNo(); @@ -891,15 +891,15 @@ namespace SabreTools.Library.DatFiles /// Read DipValue information /// /// XmlReader representing a diskarea block - /// ListXmlDipValue to populate - private void ReadDipValue(XmlReader reader, ListXmlDipValue dipValue) + /// Setting to populate + private void ReadDipValue(XmlReader reader, Setting dipValue) { // If we have an empty dipvalue, skip it if (reader == null) return; // Get list ready - dipValue.Conditions = new List(); + dipValue.Conditions = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -917,7 +917,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "condition": - var condition = new ListXmlCondition(); + var condition = new Condition(); condition.Tag = reader.GetAttribute("tag"); condition.Mask = reader.GetAttribute("mask"); condition.Relation = reader.GetAttribute("relation"); @@ -1458,6 +1458,25 @@ namespace SabreTools.Library.DatFiles xtw.WriteEndElement(); break; + case ItemType.Slot: + var slot = datItem as Slot; + xtw.WriteStartElement("file"); + xtw.WriteAttributeString("type", "slot"); + xtw.WriteOptionalAttributeString("name", slot.Name); + if (slot.SlotOptions != null) + { + foreach (var slotOption in slot.SlotOptions) + { + xtw.WriteStartElement("slotoption"); + xtw.WriteOptionalAttributeString("name", slotOption.Name); + xtw.WriteOptionalAttributeString("devname", slotOption.DeviceName); + xtw.WriteOptionalAttributeString("default", slotOption.Default.FromYesNo()); + xtw.WriteEndElement(); + } + } + xtw.WriteEndElement(); + break; + case ItemType.SoftwareList: var softwareList = datItem as DatItems.SoftwareList; xtw.WriteStartElement("file"); diff --git a/SabreTools.Library/DatFiles/SoftwareList.cs b/SabreTools.Library/DatFiles/SoftwareList.cs index bc0ef639..4e468ebb 100644 --- a/SabreTools.Library/DatFiles/SoftwareList.cs +++ b/SabreTools.Library/DatFiles/SoftwareList.cs @@ -341,9 +341,9 @@ namespace SabreTools.Library.DatFiles Name = reader.GetAttribute("name"), Tag = reader.GetAttribute("tag"), Mask = reader.GetAttribute("mask"), - Conditions = new List(), - Locations = new List(), - Values = new List(), + Conditions = new List(), + Locations = new List(), + Values = new List(), }; // Now read the internal tags @@ -526,7 +526,7 @@ namespace SabreTools.Library.DatFiles return; // Get list ready - dipSwitch.Values = new List(); + dipSwitch.Values = new List(); // Otherwise, add what is possible reader.MoveToContent(); @@ -544,7 +544,7 @@ namespace SabreTools.Library.DatFiles switch (reader.Name) { case "dipvalue": - var dipValue = new ListXmlDipValue(); + var dipValue = new Setting(); dipValue.Name = reader.GetAttribute("name"); dipValue.Value = reader.GetAttribute("value"); dipValue.Default = reader.GetAttribute("default").AsYesNo(); @@ -795,7 +795,7 @@ namespace SabreTools.Library.DatFiles xtw.WriteRequiredAttributeString("mask", dipSwitch.Mask); if (dipSwitch.Values != null) { - foreach (ListXmlDipValue dipValue in dipSwitch.Values) + foreach (Setting dipValue in dipSwitch.Values) { xtw.WriteStartElement("dipvalue"); xtw.WriteRequiredAttributeString("name", dipValue.Name); diff --git a/SabreTools.Library/DatItems/Adjuster.cs b/SabreTools.Library/DatItems/Adjuster.cs index ddc899ab..2534ba0b 100644 --- a/SabreTools.Library/DatItems/Adjuster.cs +++ b/SabreTools.Library/DatItems/Adjuster.cs @@ -25,7 +25,7 @@ namespace SabreTools.Library.DatItems /// Conditions associated with the adjustment /// [JsonProperty("conditions")] - public List Conditions { get; set; } + public List Conditions { get; set; } #endregion diff --git a/SabreTools.Library/DatItems/Auxiliary.cs b/SabreTools.Library/DatItems/Auxiliary.cs index 9346b8fc..57d2419e 100644 --- a/SabreTools.Library/DatItems/Auxiliary.cs +++ b/SabreTools.Library/DatItems/Auxiliary.cs @@ -15,7 +15,7 @@ namespace SabreTools.Library.DatItems /// Represents one ListXML analog /// [JsonObject("analog")] - public class ListXmlAnalog + public class Analog { [JsonProperty("mask")] public string Mask { get; set; } @@ -26,7 +26,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level? (Both used at ListXML level AND under a lot of stuff) [JsonObject("condition")] - public class ListXmlCondition + public class Condition { [JsonProperty("tag")] public string Tag { get; set; } @@ -41,46 +41,11 @@ namespace SabreTools.Library.DatItems public string Value { get; set; } } - /// - /// Represents one ListXML conflocation - /// - [JsonObject("conflocation")] - public class ListXmlConfLocation - { - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("number")] - public string Number { get; set; } - - [JsonProperty("inverted")] - public bool? Inverted { get; set; } - } - - /// - /// Represents one ListXML confsetting - /// - [JsonObject("confsetting")] - public class ListXmlConfSetting - { - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("value")] - public string Value { get; set; } - - [JsonProperty("default")] - public bool? Default { get; set; } - - [JsonProperty("conditions")] - public List Conditions { get; set; } - } - /// /// Represents one ListXML control /// [JsonObject("control")] - public class ListXmlControl + public class Control { [JsonProperty("type")] public string Type { get; set; } @@ -124,7 +89,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level (doesn't have "name" field?) (contains list) [JsonObject("device")] - public class ListXmlDevice + public class Device { [JsonProperty("type")] public string Type { get; set; } @@ -142,10 +107,10 @@ namespace SabreTools.Library.DatItems public string Interface { get; set; } [JsonProperty("instances")] - public List Instances { get; set; } + public List Instances { get; set; } [JsonProperty("extensions")] - public List Extensions { get; set; } + public List Extensions { get; set; } } /// @@ -153,7 +118,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level (doesn't have "name" field?) [JsonObject("display")] - public class ListXmlDisplay + public class Display { [JsonProperty("tag")] public string Tag { get; set; } @@ -198,48 +163,12 @@ namespace SabreTools.Library.DatItems public string VBStart { get; set; } // TODO: Int32? Float? } - /// - /// Represents one ListXML diplocation - /// - [JsonObject("diplocation")] - public class ListXmlDipLocation - { - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("number")] - public string Number { get; set; } - - [JsonProperty("inverted")] - public bool? Inverted { get; set; } - } - - /// - /// Represents one ListXML dipvalue - /// - /// Also used by SoftwareList - [JsonObject("dipvalue")] - public class ListXmlDipValue - { - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("value")] - public string Value { get; set; } - - [JsonProperty("default")] - public bool? Default { get; set; } - - [JsonProperty("conditions")] - public List Conditions { get; set; } - } - /// /// Represents one ListXML driver /// /// TODO: Promote to DatItem level (doesn't have "name" field?) [JsonObject("driver")] - public class ListXmlDriver + public class Driver { [JsonProperty("status")] public string Status { get; set; } // TODO: (good|imperfect|preliminary) @@ -258,7 +187,7 @@ namespace SabreTools.Library.DatItems /// Represents one ListXML extension /// [JsonObject("extension")] - public class ListXmlExtension + public class Extension { [JsonProperty("name")] public string Name { get; set; } @@ -269,7 +198,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level (doesn't have "name" field?) [JsonObject("feature")] - public class ListXmlFeature + public class Feature { [JsonProperty("type")] public string Type { get; set; } // TODO: (protection|palette|graphics|sound|controls|keyboard|mouse|microphone|camera|disk|printer|lan|wan|timing) @@ -286,7 +215,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level (doesn't have "name" field?) (contains list) [JsonObject("input")] - public class ListXmlInput + public class Input { [JsonProperty("service")] public bool? Service { get; set; } @@ -301,14 +230,14 @@ namespace SabreTools.Library.DatItems public string Coins { get; set; } // TODO: Int32? [JsonProperty("controls")] - public List Controls { get; set; } + public List Controls { get; set; } } /// /// Represents one ListXML instance /// [JsonObject("instance")] - public class ListXmlInstance + public class Instance { [JsonProperty("name")] public string Name { get; set; } @@ -317,39 +246,60 @@ namespace SabreTools.Library.DatItems public string BriefName { get; set; } } + /// + /// Represents one ListXML conflocation or diplocation + /// + [JsonObject("location")] + public class Location + { + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("number")] + public string Number { get; set; } + + [JsonProperty("inverted")] + public bool? Inverted { get; set; } + } + /// /// Represents one ListXML port /// /// TODO: Promote to DatItem level (doesn't have "name" field?) (contains list) [JsonObject("port")] - public class ListXmlPort + public class Port { [JsonProperty("tag")] public string Tag { get; set; } [JsonProperty("analogs")] - public List Analogs { get; set; } + public List Analogs { get; set; } } /// - /// Represents one ListXML slot + /// Represents one ListXML confsetting or dipvalue /// - /// TODO: Promote to DatItem level (contains list) - [JsonObject("slot")] - public class ListXmlSlot + [JsonObject("setting")] + public class Setting { [JsonProperty("name")] public string Name { get; set; } - [JsonProperty("slotoptions")] - public List SlotOptions { get; set; } + [JsonProperty("value")] + public string Value { get; set; } + + [JsonProperty("default")] + public bool? Default { get; set; } + + [JsonProperty("conditions")] + public List Conditions { get; set; } } /// /// Represents one ListXML slotoption /// [JsonObject("slotoption")] - public class ListXmlSlotOption + public class SlotOption { [JsonProperty("name")] public string Name { get; set; } @@ -366,7 +316,7 @@ namespace SabreTools.Library.DatItems /// /// TODO: Promote to DatItem level (doesn't have "name" field?) [JsonObject("sound")] - public class ListXmlSound + public class Sound { [JsonProperty("channels")] public string Channels { get; set; } // TODO: Int32? diff --git a/SabreTools.Library/DatItems/Configuration.cs b/SabreTools.Library/DatItems/Configuration.cs index ae8c0ed6..620212cc 100644 --- a/SabreTools.Library/DatItems/Configuration.cs +++ b/SabreTools.Library/DatItems/Configuration.cs @@ -30,19 +30,19 @@ namespace SabreTools.Library.DatItems /// Conditions associated with the configuration /// [JsonProperty("conditions")] - public List Conditions { get; set; } + public List Conditions { get; set; } /// /// Locations associated with the configuration /// [JsonProperty("locations")] - public List Locations { get; set; } + public List Locations { get; set; } /// /// Settings associated with the configuration /// [JsonProperty("settings")] - public List Settings { get; set; } + public List Settings { get; set; } #endregion diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index 6931bad8..fb9b2837 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -289,6 +289,12 @@ namespace SabreTools.Library.DatItems // Ram Option Field.DatItem_Content, + // Slot.SlotOptions + Field.DatItem_SlotOptions, + Field.DatItem_SlotOption_Name, + Field.DatItem_SlotOption_DeviceName, + Field.DatItem_SlotOption_Default, + // Release Field.DatItem_Language, @@ -327,7 +333,6 @@ namespace SabreTools.Library.DatItems // ListXML Field.Machine_SourceFile, Field.Machine_Runnable, - Field.Machine_Slots, Field.Machine_Infos, // Logiqx @@ -497,6 +502,9 @@ namespace SabreTools.Library.DatItems case ItemType.Sample: return new Sample(); + case ItemType.Slot: + return new Slot(); + case ItemType.SoftwareList: return new SoftwareList(); diff --git a/SabreTools.Library/DatItems/DipSwitch.cs b/SabreTools.Library/DatItems/DipSwitch.cs index bdd64738..f56dd88a 100644 --- a/SabreTools.Library/DatItems/DipSwitch.cs +++ b/SabreTools.Library/DatItems/DipSwitch.cs @@ -30,19 +30,19 @@ namespace SabreTools.Library.DatItems /// Conditions associated with the dipswitch /// [JsonProperty("conditions")] - public List Conditions { get; set; } + public List Conditions { get; set; } /// /// Locations associated with the dipswitch /// [JsonProperty("locations")] - public List Locations { get; set; } + public List Locations { get; set; } /// /// Settings associated with the dipswitch /// [JsonProperty("values")] - public List Values { get; set; } + public List Values { get; set; } #endregion diff --git a/SabreTools.Library/DatItems/Enums.cs b/SabreTools.Library/DatItems/Enums.cs index a07a9b04..b7df48a6 100644 --- a/SabreTools.Library/DatItems/Enums.cs +++ b/SabreTools.Library/DatItems/Enums.cs @@ -217,16 +217,6 @@ namespace SabreTools.Library.DatItems Machine_Device_Extensions, Machine_Device_Extension_Name, - // Slots - Machine_Slots, - Machine_Slot_Name, - - // Slots.SlotOptions - Machine_Slot_SlotOptions, - Machine_Slot_SlotOption_Name, - Machine_Slot_SlotOption_DeviceName, - Machine_Slot_SlotOption_Default, - #endregion #region Logiqx @@ -398,6 +388,12 @@ namespace SabreTools.Library.DatItems // Release DatItem_Language, + // Slot.SlotOptions + DatItem_SlotOptions, + DatItem_SlotOption_Name, + DatItem_SlotOption_DeviceName, + DatItem_SlotOption_Default, + // Software List DatItem_SoftwareListStatus, DatItem_Filter, @@ -448,6 +444,7 @@ namespace SabreTools.Library.DatItems RamOption, Release, Sample, + Slot, SoftwareList, Blank = 99, // This is not a real type, only used internally diff --git a/SabreTools.Library/DatItems/Machine.cs b/SabreTools.Library/DatItems/Machine.cs index 104d77d9..45c88cf0 100644 --- a/SabreTools.Library/DatItems/Machine.cs +++ b/SabreTools.Library/DatItems/Machine.cs @@ -156,55 +156,49 @@ namespace SabreTools.Library.DatItems /// List of associated displays /// [JsonProperty("displays", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Displays { get; set; } = null; + public List Displays { get; set; } = null; /// /// List of associated sounds /// [JsonProperty("sounds", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Sounds { get; set; } = null; + public List Sounds { get; set; } = null; /// /// List of associated conditions /// [JsonProperty("conditions", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Conditions { get; set; } = null; + public List Conditions { get; set; } = null; /// /// List of associated inputs /// [JsonProperty("inputs", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Inputs { get; set; } = null; + public List Inputs { get; set; } = null; /// /// List of associated ports /// [JsonProperty("ports", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Ports { get; set; } = null; + public List Ports { get; set; } = null; /// /// List of associated drivers /// [JsonProperty("drivers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Drivers { get; set; } = null; + public List Drivers { get; set; } = null; /// /// List of associated features /// [JsonProperty("features", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Features { get; set; } = null; + public List Features { get; set; } = null; /// /// List of associated devices /// [JsonProperty("devices", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Devices { get; set; } = null; - - /// - /// List of slot options - /// - [JsonProperty("slots", DefaultValueHandling = DefaultValueHandling.Ignore)] - public List Slots { get; set; } = null; + public List Devices { get; set; } = null; #endregion @@ -566,7 +560,6 @@ namespace SabreTools.Library.DatItems Drivers = this.Drivers, Features = this.Features, Devices = this.Devices, - Slots = this.Slots, #endregion @@ -1456,9 +1449,6 @@ namespace SabreTools.Library.DatItems if (fields.Contains(Field.Machine_Runnable)) Runnable = Runnable.NULL; - if (fields.Contains(Field.Machine_Slots)) - Slots = null; - if (fields.Contains(Field.Machine_Infos)) Infos = null; @@ -1615,9 +1605,6 @@ namespace SabreTools.Library.DatItems if (fields.Contains(Field.Machine_Runnable)) Runnable = machine.Runnable; - if (fields.Contains(Field.Machine_Slots)) - Slots = machine.Slots; - if (fields.Contains(Field.Machine_Infos)) Infos = machine.Infos; diff --git a/SabreTools.Library/DatItems/Slot.cs b/SabreTools.Library/DatItems/Slot.cs new file mode 100644 index 00000000..8536a892 --- /dev/null +++ b/SabreTools.Library/DatItems/Slot.cs @@ -0,0 +1,174 @@ +using System.Collections.Generic; + +using SabreTools.Library.Filtering; +using Newtonsoft.Json; + +namespace SabreTools.Library.DatItems +{ + /// + /// Represents which Slot(s) is associated with a set + /// + [JsonObject("slot")] + public class Slot : DatItem + { + #region Fields + + /// + /// Slot options associated with the slot + /// + [JsonProperty("slotoptions")] + public List SlotOptions { get; set; } + + #endregion + + #region Accessors + + /// + /// Set fields with given values + /// + /// Mappings dictionary + public override void SetFields(Dictionary mappings) + { + // Set base fields + base.SetFields(mappings); + + // Handle Slot-specific fields + + // TODO: Handle DatItem_SlotOption* + } + + #endregion + + #region Constructors + + /// + /// Create a default, empty Slot object + /// + public Slot() + { + Name = string.Empty; + ItemType = ItemType.Slot; + } + + #endregion + + #region Cloning Methods + + public override object Clone() + { + return new Slot() + { + Name = this.Name, + ItemType = this.ItemType, + DupeType = this.DupeType, + + AltName = this.AltName, + AltTitle = this.AltTitle, + + Original = this.Original, + OpenMSXSubType = this.OpenMSXSubType, + OpenMSXType = this.OpenMSXType, + Remark = this.Remark, + Boot = this.Boot, + + Part = this.Part, + Features = this.Features, + AreaName = this.AreaName, + AreaSize = this.AreaSize, + AreaWidth = this.AreaWidth, + AreaEndianness = this.AreaEndianness, + Value = this.Value, + LoadFlag = this.LoadFlag, + + Machine = this.Machine.Clone() as Machine, + Source = this.Source.Clone() as Source, + Remove = this.Remove, + + SlotOptions = this.SlotOptions, + }; + } + + #endregion + + #region Comparision Methods + + public override bool Equals(DatItem other) + { + // If we don't have a Slot, return false + if (ItemType != other.ItemType) + return false; + + // Otherwise, treat it as a Slot + Slot newOther = other as Slot; + + // If the Slot information matches + return (Name == newOther.Name); // TODO: Handle DatItem_SlotOption* + } + + #endregion + + #region Filtering + + /// + /// Check to see if a DatItem passes the filter + /// + /// Filter to check against + /// True if the item passed the filter, false otherwise + public override bool PassesFilter(Filter filter) + { + // Check common fields first + if (!base.PassesFilter(filter)) + return false; + + // TODO: Handle DatItem_SlotOption* + + return true; + } + + /// + /// Remove fields from the DatItem + /// + /// List of Fields to remove + public override void RemoveFields(List fields) + { + // Remove common fields first + base.RemoveFields(fields); + + // Remove the fields + if (fields.Contains(Field.DatItem_SlotOptions)) + SlotOptions = null; + + // TODO: Handle DatItem_SlotOption* + } + + #endregion + + #region Sorting and Merging + + /// + /// Replace fields from another item + /// + /// DatItem to pull new information from + /// List of Fields representing what should be updated + public override void ReplaceFields(DatItem item, List fields) + { + // Replace common fields first + base.ReplaceFields(item, fields); + + // If we don't have a Slot to replace from, ignore specific fields + if (item.ItemType != ItemType.Slot) + return; + + // Cast for easier access + Slot newItem = item as Slot; + + // Replace the fields + if (fields.Contains(Field.DatItem_SlotOptions)) + SlotOptions = newItem.SlotOptions; + + // TODO: Handle DatItem_SlotOption* + } + + #endregion + } +} diff --git a/SabreTools.Library/Filtering/Filter.cs b/SabreTools.Library/Filtering/Filter.cs index 43b30b03..c6001628 100644 --- a/SabreTools.Library/Filtering/Filter.cs +++ b/SabreTools.Library/Filtering/Filter.cs @@ -139,16 +139,6 @@ namespace SabreTools.Library.Filtering public FilterItem Machine_Device_Extensions { get; private set; } = new FilterItem() { Neutral = null }; public FilterItem Machine_Device_Extension_Name { get; private set; } = new FilterItem(); - // Slots - public FilterItem Machine_Slots { get; private set; } = new FilterItem() { Neutral = null }; - public FilterItem Machine_Slot_Name { get; private set; } = new FilterItem(); - - // Slots.SlotOptions - public FilterItem Machine_Slot_SlotOptions { get; private set; } = new FilterItem() { Neutral = null }; - public FilterItem Machine_Slot_SlotOption_Name { get; private set; } = new FilterItem(); - public FilterItem Machine_Slot_SlotOption_DeviceName { get; private set; } = new FilterItem(); - public FilterItem Machine_Slot_SlotOption_Default { get; private set; } = new FilterItem() { Neutral = null }; - #endregion #region Logiqx @@ -320,6 +310,12 @@ namespace SabreTools.Library.Filtering // Release public FilterItem DatItem_Language { get; private set; } = new FilterItem(); + // Slots.SlotOptions + public FilterItem DatItem_SlotOptions { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_SlotOption_Name { get; private set; } = new FilterItem(); + public FilterItem DatItem_SlotOption_DeviceName { get; private set; } = new FilterItem(); + public FilterItem DatItem_SlotOption_Default { get; private set; } = new FilterItem() { Neutral = null }; + // Software List public FilterItem DatItem_SoftwareListStatus { get; private set; } = new FilterItem() { Positive = SoftwareListStatus.NULL, Negative = SoftwareListStatus.NULL }; public FilterItem DatItem_Filter { get; private set; } = new FilterItem(); @@ -1011,50 +1007,6 @@ namespace SabreTools.Library.Filtering Machine_Device_Extension_Name.PositiveSet.Add(value); break; - // Slots - case Field.Machine_Slots: - if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Machine_Slots.Neutral = false; - else - Machine_Slots.Neutral = true; - break; - - case Field.Machine_Slot_Name: - if (negate) - Machine_Slot_Name.NegativeSet.Add(value); - else - Machine_Slot_Name.PositiveSet.Add(value); - break; - - // Slots.SlotOptions - case Field.Machine_Slot_SlotOptions: - if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Machine_Slot_SlotOptions.Neutral = false; - else - Machine_Slot_SlotOptions.Neutral = true; - break; - - case Field.Machine_Slot_SlotOption_Name: - if (negate) - Machine_Slot_SlotOption_Name.NegativeSet.Add(value); - else - Machine_Slot_SlotOption_Name.PositiveSet.Add(value); - break; - - case Field.Machine_Slot_SlotOption_DeviceName: - if (negate) - Machine_Slot_SlotOption_DeviceName.NegativeSet.Add(value); - else - Machine_Slot_SlotOption_DeviceName.PositiveSet.Add(value); - break; - - case Field.Machine_Slot_SlotOption_Default: - if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Machine_Slot_SlotOption_Default.Neutral = false; - else - Machine_Slot_SlotOption_Default.Neutral = true; - break; - #endregion #region Logiqx @@ -1806,6 +1758,35 @@ namespace SabreTools.Library.Filtering DatItem_Language.PositiveSet.Add(value); break; + // Slots.SlotOptions + case Field.DatItem_SlotOptions: + if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) + DatItem_SlotOptions.Neutral = false; + else + DatItem_SlotOptions.Neutral = true; + break; + + case Field.DatItem_SlotOption_Name: + if (negate) + DatItem_SlotOption_Name.NegativeSet.Add(value); + else + DatItem_SlotOption_Name.PositiveSet.Add(value); + break; + + case Field.DatItem_SlotOption_DeviceName: + if (negate) + DatItem_SlotOption_DeviceName.NegativeSet.Add(value); + else + DatItem_SlotOption_DeviceName.PositiveSet.Add(value); + break; + + case Field.DatItem_SlotOption_Default: + if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) + DatItem_SlotOption_Default.Neutral = false; + else + DatItem_SlotOption_Default.Neutral = true; + break; + // Software List case Field.DatItem_SoftwareListStatus: if (negate) diff --git a/SabreTools.Library/Tools/Converters.cs b/SabreTools.Library/Tools/Converters.cs index f9e7613f..9af93ac7 100644 --- a/SabreTools.Library/Tools/Converters.cs +++ b/SabreTools.Library/Tools/Converters.cs @@ -647,24 +647,6 @@ namespace SabreTools.Library.Tools case "device_extension_name": return Field.Machine_Device_Extension_Name; - case "slots": - return Field.Machine_Slots; - - case "slot_name": - return Field.Machine_Slot_Name; - - case "slot_slotoptions": - return Field.Machine_Slot_SlotOptions; - - case "slot_slotoption_name": - return Field.Machine_Slot_SlotOption_Name; - - case "slot_slotoption_devicename": - return Field.Machine_Slot_SlotOption_DeviceName; - - case "slot_slotoption_default": - return Field.Machine_Slot_SlotOption_Default; - #endregion #region Logiqx @@ -1046,6 +1028,19 @@ namespace SabreTools.Library.Tools case "language": return Field.DatItem_Language; + // Slot + case "slotoptions": + return Field.DatItem_SlotOptions; + + case "slotoption_name": + return Field.DatItem_SlotOption_Name; + + case "slotoption_devicename": + return Field.DatItem_SlotOption_DeviceName; + + case "slotoption_default": + return Field.DatItem_SlotOption_Default; + // Software List case "softwareliststatus": case "softwarelist_status": @@ -1172,11 +1167,6 @@ namespace SabreTools.Library.Tools case "runnable": return Field.Machine_Runnable; - case "slotoptions": - case "slot options": - case "slot-options": - return Field.Machine_Slots; - case "infos": return Field.Machine_Infos; @@ -1589,6 +1579,8 @@ namespace SabreTools.Library.Tools return ItemType.Rom; case "sample": return ItemType.Sample; + case "slot": + return ItemType.Slot; case "softwarelist": return ItemType.SoftwareList; default: @@ -1611,6 +1603,7 @@ namespace SabreTools.Library.Tools "release" => ItemType.Release, "rom" => ItemType.Rom, "sample" => ItemType.Sample, + "slot" => ItemType.Slot, "softwarelist" => ItemType.SoftwareList, _ => null, }; @@ -2031,6 +2024,8 @@ namespace SabreTools.Library.Tools return "rom"; case ItemType.Sample: return "sample"; + case ItemType.Slot: + return "slot"; case ItemType.SoftwareList: return "softwarelist"; default: @@ -2053,6 +2048,7 @@ namespace SabreTools.Library.Tools ItemType.Release => "release", ItemType.Rom => "rom", ItemType.Sample => "sample", + ItemType.Slot => "slot", ItemType.SoftwareList => "softwarelist", _ => null, }; diff --git a/SabreTools/Features/BaseFeature.cs b/SabreTools/Features/BaseFeature.cs index 950ca871..89ad3691 100644 --- a/SabreTools/Features/BaseFeature.cs +++ b/SabreTools/Features/BaseFeature.cs @@ -67,11 +67,11 @@ namespace SabreTools.Features #region Flag features internal const string AaruFormatsAsFilesValue = "aaruformats-as-files"; - internal static Feature AaruFormatsAsFilesFlag + internal static Library.Help.Feature AaruFormatsAsFilesFlag { get { - return new Feature( + return new Library.Help.Feature( AaruFormatsAsFilesValue, new List() { "-caf", "--aaruformats-as-files" }, "Treat AaruFormats as files", @@ -81,11 +81,11 @@ namespace SabreTools.Features } internal const string AddBlankFilesValue = "add-blank-files"; - internal static Feature AddBlankFilesFlag + internal static Library.Help.Feature AddBlankFilesFlag { get { - return new Feature( + return new Library.Help.Feature( AddBlankFilesValue, new List() { "-ab", "--add-blank-files" }, "Output blank files for folders", @@ -95,11 +95,11 @@ namespace SabreTools.Features } internal const string AddDateValue = "add-date"; - internal static Feature AddDateFlag + internal static Library.Help.Feature AddDateFlag { get { - return new Feature( + return new Library.Help.Feature( AddDateValue, new List() { "-ad", "--add-date" }, "Add dates to items, where posible", @@ -109,11 +109,11 @@ namespace SabreTools.Features } internal const string ArchivesAsFilesValue = "archives-as-files"; - internal static Feature ArchivesAsFilesFlag + internal static Library.Help.Feature ArchivesAsFilesFlag { get { - return new Feature( + return new Library.Help.Feature( ArchivesAsFilesValue, new List() { "-aaf", "--archives-as-files" }, "Treat archives as files", @@ -123,11 +123,11 @@ namespace SabreTools.Features } internal const string BaddumpColumnValue = "baddump-column"; - internal static Feature BaddumpColumnFlag + internal static Library.Help.Feature BaddumpColumnFlag { get { - return new Feature( + return new Library.Help.Feature( BaddumpColumnValue, new List() { "-bc", "--baddump-column" }, "Add baddump stats to output", @@ -137,11 +137,11 @@ namespace SabreTools.Features } internal const string BaseValue = "base"; - internal static Feature BaseFlag + internal static Library.Help.Feature BaseFlag { get { - return new Feature( + return new Library.Help.Feature( BaseValue, new List() { "-ba", "--base" }, "Use source DAT as base name for outputs", @@ -151,11 +151,11 @@ namespace SabreTools.Features } internal const string BaseReplaceValue = "base-replace"; - internal static Feature BaseReplaceFlag + internal static Library.Help.Feature BaseReplaceFlag { get { - return new Feature( + return new Library.Help.Feature( BaseReplaceValue, new List() { "-br", "--base-replace" }, "Replace from base DATs in order", @@ -165,11 +165,11 @@ namespace SabreTools.Features } internal const string ByGameValue = "by-game"; - internal static Feature ByGameFlag + internal static Library.Help.Feature ByGameFlag { get { - return new Feature( + return new Library.Help.Feature( ByGameValue, new List() { "-bg", "--by-game" }, "Diff against by game instead of hashes", @@ -179,11 +179,11 @@ namespace SabreTools.Features } internal const string ChdsAsFilesValue = "chds-as-files"; - internal static Feature ChdsAsFilesFlag + internal static Library.Help.Feature ChdsAsFilesFlag { get { - return new Feature( + return new Library.Help.Feature( ChdsAsFilesValue, new List() { "-ic", "--chds-as-files" }, "Treat CHDs as regular files", @@ -193,11 +193,11 @@ namespace SabreTools.Features } internal const string CleanValue = "clean"; - internal static Feature CleanFlag + internal static Library.Help.Feature CleanFlag { get { - return new Feature( + return new Library.Help.Feature( CleanValue, new List() { "-clean", "--clean" }, "Clean game names according to WoD standards", @@ -207,11 +207,11 @@ namespace SabreTools.Features } internal const string CopyFilesValue = "copy-files"; - internal static Feature CopyFilesFlag + internal static Library.Help.Feature CopyFilesFlag { get { - return new Feature( + return new Library.Help.Feature( CopyFilesValue, new List() { "-cf", "--copy-files" }, "Copy files to the temp directory before parsing", @@ -221,11 +221,11 @@ namespace SabreTools.Features } internal const string DatDeviceNonMergedValue = "dat-device-non-merged"; - internal static Feature DatDeviceNonMergedFlag + internal static Library.Help.Feature DatDeviceNonMergedFlag { get { - return new Feature( + return new Library.Help.Feature( DatDeviceNonMergedValue, new List() { "-dnd", "--dat-device-non-merged" }, "Create device non-merged sets", @@ -235,11 +235,11 @@ namespace SabreTools.Features } internal const string DatFullNonMergedValue = "dat-full-non-merged"; - internal static Feature DatFullNonMergedFlag + internal static Library.Help.Feature DatFullNonMergedFlag { get { - return new Feature( + return new Library.Help.Feature( DatFullNonMergedValue, new List() { "-df", "--dat-full-non-merged" }, "Create fully non-merged sets", @@ -249,11 +249,11 @@ namespace SabreTools.Features } internal const string DatMergedValue = "dat-merged"; - internal static Feature DatMergedFlag + internal static Library.Help.Feature DatMergedFlag { get { - return new Feature( + return new Library.Help.Feature( DatMergedValue, new List() { "-dm", "--dat-merged" }, "Force creating merged sets", @@ -263,11 +263,11 @@ namespace SabreTools.Features } internal const string DatNonMergedValue = "dat-non-merged"; - internal static Feature DatNonMergedFlag + internal static Library.Help.Feature DatNonMergedFlag { get { - return new Feature( + return new Library.Help.Feature( DatNonMergedValue, new List() { "-dnm", "--dat-non-merged" }, "Force creating non-merged sets", @@ -277,11 +277,11 @@ namespace SabreTools.Features } internal const string DatSplitValue = "dat-split"; - internal static Feature DatSplitFlag + internal static Library.Help.Feature DatSplitFlag { get { - return new Feature( + return new Library.Help.Feature( DatSplitValue, new List() { "-ds", "--dat-split" }, "Force creating split sets", @@ -291,11 +291,11 @@ namespace SabreTools.Features } internal const string DedupValue = "dedup"; - internal static Feature DedupFlag + internal static Library.Help.Feature DedupFlag { get { - return new Feature( + return new Library.Help.Feature( DedupValue, new List() { "-dd", "--dedup" }, "Enable deduping in the created DAT", @@ -305,11 +305,11 @@ namespace SabreTools.Features } internal const string DeleteValue = "delete"; - internal static Feature DeleteFlag + internal static Library.Help.Feature DeleteFlag { get { - return new Feature( + return new Library.Help.Feature( DeleteValue, new List() { "-del", "--delete" }, "Delete fully rebuilt input files", @@ -319,11 +319,11 @@ namespace SabreTools.Features } internal const string DepotValue = "depot"; - internal static Feature DepotFlag + internal static Library.Help.Feature DepotFlag { get { - return new Feature( + return new Library.Help.Feature( DepotValue, new List() { "-dep", "--depot" }, "Assume directories are Romba depots", @@ -333,11 +333,11 @@ namespace SabreTools.Features } internal const string DeprecatedValue = "deprecated"; - internal static Feature DeprecatedFlag + internal static Library.Help.Feature DeprecatedFlag { get { - return new Feature( + return new Library.Help.Feature( DeprecatedValue, new List() { "-dpc", "--deprecated" }, "Output 'game' instead of 'machine'", @@ -347,11 +347,11 @@ namespace SabreTools.Features } internal const string DescriptionAsNameValue = "description-as-name"; - internal static Feature DescriptionAsNameFlag + internal static Library.Help.Feature DescriptionAsNameFlag { get { - return new Feature( + return new Library.Help.Feature( DescriptionAsNameValue, new List() { "-dan", "--description-as-name" }, "Use description instead of machine name", @@ -361,11 +361,11 @@ namespace SabreTools.Features } internal const string DiffAgainstValue = "diff-against"; - internal static Feature DiffAgainstFlag + internal static Library.Help.Feature DiffAgainstFlag { get { - return new Feature( + return new Library.Help.Feature( DiffAgainstValue, new List() { "-dag", "--diff-against" }, "Diff all inputs against a set of base DATs", @@ -375,11 +375,11 @@ namespace SabreTools.Features } internal const string DiffAllValue = "diff-all"; - internal static Feature DiffAllFlag + internal static Library.Help.Feature DiffAllFlag { get { - return new Feature( + return new Library.Help.Feature( DiffAllValue, new List() { "-di", "--diff-all" }, "Create diffdats from inputs (all standard outputs)", @@ -389,11 +389,11 @@ namespace SabreTools.Features } internal const string DiffCascadeValue = "diff-cascade"; - internal static Feature DiffCascadeFlag + internal static Library.Help.Feature DiffCascadeFlag { get { - return new Feature( + return new Library.Help.Feature( DiffCascadeValue, new List() { "-dc", "--diff-cascade" }, "Enable cascaded diffing", @@ -403,11 +403,11 @@ namespace SabreTools.Features } internal const string DiffDuplicatesValue = "diff-duplicates"; - internal static Feature DiffDuplicatesFlag + internal static Library.Help.Feature DiffDuplicatesFlag { get { - return new Feature( + return new Library.Help.Feature( DiffDuplicatesValue, new List() { "-did", "--diff-duplicates" }, "Create diffdat containing just duplicates", @@ -417,11 +417,11 @@ namespace SabreTools.Features } internal const string DiffIndividualsValue = "diff-individuals"; - internal static Feature DiffIndividualsFlag + internal static Library.Help.Feature DiffIndividualsFlag { get { - return new Feature( + return new Library.Help.Feature( DiffIndividualsValue, new List() { "-dii", "--diff-individuals" }, "Create diffdats for individual DATs", @@ -431,11 +431,11 @@ namespace SabreTools.Features } internal const string DiffNoDuplicatesValue = "diff-no-duplicates"; - internal static Feature DiffNoDuplicatesFlag + internal static Library.Help.Feature DiffNoDuplicatesFlag { get { - return new Feature( + return new Library.Help.Feature( DiffNoDuplicatesValue, new List() { "-din", "--diff-no-duplicates" }, "Create diffdat containing no duplicates", @@ -445,11 +445,11 @@ namespace SabreTools.Features } internal const string DiffReverseCascadeValue = "diff-reverse-cascade"; - internal static Feature DiffReverseCascadeFlag + internal static Library.Help.Feature DiffReverseCascadeFlag { get { - return new Feature( + return new Library.Help.Feature( DiffReverseCascadeValue, new List() { "-drc", "--diff-reverse-cascade" }, "Enable reverse cascaded diffing", @@ -459,11 +459,11 @@ namespace SabreTools.Features } internal const string ExtensionValue = "extension"; - internal static Feature ExtensionFlag + internal static Library.Help.Feature ExtensionFlag { get { - return new Feature( + return new Library.Help.Feature( ExtensionValue, new List() { "-es", "--extension" }, "Split DAT(s) by two file extensions", @@ -473,11 +473,11 @@ namespace SabreTools.Features } internal const string GameDedupValue = "game-dedup"; - internal static Feature GameDedupFlag + internal static Library.Help.Feature GameDedupFlag { get { - return new Feature( + return new Library.Help.Feature( GameDedupValue, new List() { "-gdd", "--game-dedup" }, "Enable deduping within games in the created DAT", @@ -487,11 +487,11 @@ namespace SabreTools.Features } internal const string GamePrefixValue = "game-prefix"; - internal static Feature GamePrefixFlag + internal static Library.Help.Feature GamePrefixFlag { get { - return new Feature( + return new Library.Help.Feature( GamePrefixValue, new List() { "-gp", "--game-prefix" }, "Add game name as a prefix", @@ -501,11 +501,11 @@ namespace SabreTools.Features } internal const string HashValue = "hash"; - internal static Feature HashFlag + internal static Library.Help.Feature HashFlag { get { - return new Feature( + return new Library.Help.Feature( HashValue, new List() { "-hs", "--hash" }, "Split DAT(s) or folder by best-available hashes", @@ -515,11 +515,11 @@ namespace SabreTools.Features } internal const string HashOnlyValue = "hash-only"; - internal static Feature HashOnlyFlag + internal static Library.Help.Feature HashOnlyFlag { get { - return new Feature( + return new Library.Help.Feature( HashOnlyValue, new List() { "-ho", "--hash-only" }, "Check files by hash only", @@ -529,11 +529,11 @@ namespace SabreTools.Features } internal const string IndividualValue = "individual"; - internal static Feature IndividualFlag + internal static Library.Help.Feature IndividualFlag { get { - return new Feature( + return new Library.Help.Feature( IndividualValue, new List() { "-ind", "--individual" }, "Process input DATs individually", @@ -543,11 +543,11 @@ namespace SabreTools.Features } internal const string InplaceValue = "inplace"; - internal static Feature InplaceFlag + internal static Library.Help.Feature InplaceFlag { get { - return new Feature( + return new Library.Help.Feature( InplaceValue, new List() { "-ip", "--inplace" }, "Write to the input directories, where possible", @@ -557,11 +557,11 @@ namespace SabreTools.Features } internal const string InverseValue = "inverse"; - internal static Feature InverseFlag + internal static Library.Help.Feature InverseFlag { get { - return new Feature( + return new Library.Help.Feature( InverseValue, new List() { "-in", "--inverse" }, "Rebuild only files not in DAT", @@ -571,11 +571,11 @@ namespace SabreTools.Features } internal const string KeepEmptyGamesValue = "keep-empty-games"; - internal static Feature KeepEmptyGamesFlag + internal static Library.Help.Feature KeepEmptyGamesFlag { get { - return new Feature( + return new Library.Help.Feature( KeepEmptyGamesValue, new List() { "-keg", "--keep-empty-games" }, "Keep originally empty sets from the input(s)", @@ -585,11 +585,11 @@ namespace SabreTools.Features } internal const string LevelValue = "level"; - internal static Feature LevelFlag + internal static Library.Help.Feature LevelFlag { get { - return new Feature( + return new Library.Help.Feature( LevelValue, new List() { "-ls", "--level" }, "Split a SuperDAT or folder by lowest available level", @@ -599,11 +599,11 @@ namespace SabreTools.Features } internal const string MatchOfTagsValue = "match-of-tags"; - internal static Feature MatchOfTagsFlag + internal static Library.Help.Feature MatchOfTagsFlag { get { - return new Feature( + return new Library.Help.Feature( MatchOfTagsValue, new List() { "-ofg", "--match-of-tags" }, "Allow cloneof and romof tags to match game name filters", @@ -613,11 +613,11 @@ namespace SabreTools.Features } internal const string MergeValue = "merge"; - internal static Feature MergeFlag + internal static Library.Help.Feature MergeFlag { get { - return new Feature( + return new Library.Help.Feature( MergeValue, new List() { "-m", "--merge" }, "Merge the input DATs", @@ -627,11 +627,11 @@ namespace SabreTools.Features } internal const string NoAutomaticDateValue = "no-automatic-date"; - internal static Feature NoAutomaticDateFlag + internal static Library.Help.Feature NoAutomaticDateFlag { get { - return new Feature( + return new Library.Help.Feature( NoAutomaticDateValue, new List() { "-b", "--no-automatic-date" }, "Don't include date in file name", @@ -641,11 +641,11 @@ namespace SabreTools.Features } internal const string NodumpColumnValue = "nodump-column"; - internal static Feature NodumpColumnFlag + internal static Library.Help.Feature NodumpColumnFlag { get { - return new Feature( + return new Library.Help.Feature( NodumpColumnValue, new List() { "-nc", "--nodump-column" }, "Add statistics for nodumps to output", @@ -655,11 +655,11 @@ namespace SabreTools.Features } internal const string NoStoreHeaderValue = "no-store-header"; - internal static Feature NoStoreHeaderFlag + internal static Library.Help.Feature NoStoreHeaderFlag { get { - return new Feature( + return new Library.Help.Feature( NoStoreHeaderValue, new List() { "-nsh", "--no-store-header" }, "Don't store the extracted header", @@ -669,11 +669,11 @@ namespace SabreTools.Features } internal const string NotRunnableValue = "not-runnable"; - internal static Feature NotRunnableFlag + internal static Library.Help.Feature NotRunnableFlag { get { - return new Feature( + return new Library.Help.Feature( NotRunnableValue, new List() { "-nrun", "--not-runnable" }, "Include only items that are not marked runnable", @@ -683,11 +683,11 @@ namespace SabreTools.Features } internal const string OneGamePerRegionValue = "one-game-per-region"; - internal static Feature OneGamePerRegionFlag + internal static Library.Help.Feature OneGamePerRegionFlag { get { - return new Feature( + return new Library.Help.Feature( OneGamePerRegionValue, new List() { "-1g1r", "--one-game-per-region" }, "Try to ensure one game per user-defined region", @@ -697,11 +697,11 @@ namespace SabreTools.Features } internal const string OneRomPerGameValue = "one-rom-per-game"; - internal static Feature OneRomPerGameFlag + internal static Library.Help.Feature OneRomPerGameFlag { get { - return new Feature( + return new Library.Help.Feature( OneRomPerGameValue, new List() { "-orpg", "--one-rom-per-game" }, "Try to ensure each rom has its own game", @@ -711,11 +711,11 @@ namespace SabreTools.Features } internal const string OnlySameValue = "only-same"; - internal static Feature OnlySameFlag + internal static Library.Help.Feature OnlySameFlag { get { - return new Feature( + return new Library.Help.Feature( OnlySameValue, new List() { "-ons", "--only-same" }, "Only update description if machine name matches description", @@ -725,11 +725,11 @@ namespace SabreTools.Features } internal const string QuickValue = "quick"; - internal static Feature QuickFlag + internal static Library.Help.Feature QuickFlag { get { - return new Feature( + return new Library.Help.Feature( QuickValue, new List() { "-qs", "--quick" }, "Enable quick scanning of archives", @@ -739,11 +739,11 @@ namespace SabreTools.Features } internal const string QuotesValue = "quotes"; - internal static Feature QuotesFlag + internal static Library.Help.Feature QuotesFlag { get { - return new Feature( + return new Library.Help.Feature( QuotesValue, new List() { "-q", "--quotes" }, "Double-quote each item", @@ -753,11 +753,11 @@ namespace SabreTools.Features } internal const string RemoveExtensionsValue = "remove-extensions"; - internal static Feature RemoveExtensionsFlag + internal static Library.Help.Feature RemoveExtensionsFlag { get { - return new Feature( + return new Library.Help.Feature( RemoveExtensionsValue, new List() { "-rme", "--remove-extensions" }, "Remove all extensions from all items", @@ -767,11 +767,11 @@ namespace SabreTools.Features } internal const string RemoveUnicodeValue = "remove-unicode"; - internal static Feature RemoveUnicodeFlag + internal static Library.Help.Feature RemoveUnicodeFlag { get { - return new Feature( + return new Library.Help.Feature( RemoveUnicodeValue, new List() { "-ru", "--remove-unicode" }, "Remove unicode characters from names", @@ -781,11 +781,11 @@ namespace SabreTools.Features } internal const string ReverseBaseReplaceValue = "reverse-base-replace"; - internal static Feature ReverseBaseReplaceFlag + internal static Library.Help.Feature ReverseBaseReplaceFlag { get { - return new Feature( + return new Library.Help.Feature( ReverseBaseReplaceValue, new List() { "-rbr", "--reverse-base-replace" }, "Replace item names from base DATs in reverse", @@ -795,11 +795,11 @@ namespace SabreTools.Features } internal const string RombaValue = "romba"; - internal static Feature RombaFlag + internal static Library.Help.Feature RombaFlag { get { - return new Feature( + return new Library.Help.Feature( RombaValue, new List() { "-ro", "--romba" }, "Treat like a Romba depot (requires SHA-1)", @@ -809,11 +809,11 @@ namespace SabreTools.Features } internal const string RomsValue = "roms"; - internal static Feature RomsFlag + internal static Library.Help.Feature RomsFlag { get { - return new Feature( + return new Library.Help.Feature( RomsValue, new List() { "-r", "--roms" }, "Output roms to miss instead of sets", @@ -823,11 +823,11 @@ namespace SabreTools.Features } internal const string RunnableValue = "runnable"; - internal static Feature RunnableFlag + internal static Library.Help.Feature RunnableFlag { get { - return new Feature( + return new Library.Help.Feature( RunnableValue, new List() { "-run", "--runnable" }, "Include only items that are marked runnable", @@ -837,11 +837,11 @@ namespace SabreTools.Features } internal const string SceneDateStripValue = "scene-date-strip"; - internal static Feature SceneDateStripFlag + internal static Library.Help.Feature SceneDateStripFlag { get { - return new Feature( + return new Library.Help.Feature( SceneDateStripValue, new List() { "-sds", "--scene-date-strip" }, "Remove date from scene-named sets", @@ -851,11 +851,11 @@ namespace SabreTools.Features } internal const string ShortValue = "short"; - internal static Feature ShortFlag + internal static Library.Help.Feature ShortFlag { get { - return new Feature( + return new Library.Help.Feature( ShortValue, new List() { "-s", "--short" }, "Use short output names", @@ -865,11 +865,11 @@ namespace SabreTools.Features } internal const string SingleSetValue = "single-set"; - internal static Feature SingleSetFlag + internal static Library.Help.Feature SingleSetFlag { get { - return new Feature( + return new Library.Help.Feature( SingleSetValue, new List() { "-si", "--single-set" }, "All game names replaced by '!'", @@ -879,11 +879,11 @@ namespace SabreTools.Features } internal const string SizeValue = "size"; - internal static Feature SizeFlag + internal static Library.Help.Feature SizeFlag { get { - return new Feature( + return new Library.Help.Feature( SizeValue, new List() { "-szs", "--size" }, "Split DAT(s) or folder by file sizes", @@ -893,11 +893,11 @@ namespace SabreTools.Features } internal const string SkipArchivesValue = "skip-archives"; - internal static Feature SkipArchivesFlag + internal static Library.Help.Feature SkipArchivesFlag { get { - return new Feature( + return new Library.Help.Feature( SkipArchivesValue, new List() { "-ska", "--skip-archives" }, "Skip all archives", @@ -907,11 +907,11 @@ namespace SabreTools.Features } internal const string SkipFilesValue = "skip-files"; - internal static Feature SkipFilesFlag + internal static Library.Help.Feature SkipFilesFlag { get { - return new Feature( + return new Library.Help.Feature( SkipFilesValue, new List() { "-skf", "--skip-files" }, "Skip all non-archives", @@ -921,11 +921,11 @@ namespace SabreTools.Features } internal const string SkipFirstOutputValue = "skip-first-output"; - internal static Feature SkipFirstOutputFlag + internal static Library.Help.Feature SkipFirstOutputFlag { get { - return new Feature( + return new Library.Help.Feature( SkipFirstOutputValue, new List() { "-sf", "--skip-first-output" }, "Skip output of first DAT", @@ -935,11 +935,11 @@ namespace SabreTools.Features } internal const string SkipMd5Value = "skip-md5"; - internal static Feature SkipMd5Flag + internal static Library.Help.Feature SkipMd5Flag { get { - return new Feature( + return new Library.Help.Feature( SkipMd5Value, new List() { "-nm", "--skip-md5" }, "Don't include MD5 in output", @@ -950,11 +950,11 @@ namespace SabreTools.Features #if NET_FRAMEWORK internal const string SkipRipeMd160Value = "skip-ripemd160"; - internal static Feature SkipRipeMd160Flag + internal static Library.Help.Feature SkipRipeMd160Flag { get { - return new Feature( + return new Library.Help.Feature( SkipRipeMd160Value, new List() { "-nr160", "--skip-ripemd160" }, "Include RIPEMD160 in output", // TODO: This needs to be inverted later @@ -965,11 +965,11 @@ namespace SabreTools.Features #endif internal const string SkipSha1Value = "skip-sha1"; - internal static Feature SkipSha1Flag + internal static Library.Help.Feature SkipSha1Flag { get { - return new Feature( + return new Library.Help.Feature( SkipSha1Value, new List() { "-ns", "--skip-sha1" }, "Don't include SHA-1 in output", @@ -979,11 +979,11 @@ namespace SabreTools.Features } internal const string SkipSha256Value = "skip-sha256"; - internal static Feature SkipSha256Flag + internal static Library.Help.Feature SkipSha256Flag { get { - return new Feature( + return new Library.Help.Feature( SkipSha256Value, new List() { "-ns256", "--skip-sha256" }, "Include SHA-256 in output", // TODO: This needs to be inverted later @@ -993,11 +993,11 @@ namespace SabreTools.Features } internal const string SkipSha384Value = "skip-sha384"; - internal static Feature SkipSha384Flag + internal static Library.Help.Feature SkipSha384Flag { get { - return new Feature( + return new Library.Help.Feature( SkipSha384Value, new List() { "-ns384", "--skip-sha384" }, "Include SHA-384 in output", // TODO: This needs to be inverted later @@ -1007,11 +1007,11 @@ namespace SabreTools.Features } internal const string SkipSha512Value = "skip-sha512"; - internal static Feature SkipSha512Flag + internal static Library.Help.Feature SkipSha512Flag { get { - return new Feature( + return new Library.Help.Feature( SkipSha512Value, new List() { "-ns512", "--skip-sha512" }, "Include SHA-512 in output", // TODO: This needs to be inverted later @@ -1021,11 +1021,11 @@ namespace SabreTools.Features } internal const string SuperdatValue = "superdat"; - internal static Feature SuperdatFlag + internal static Library.Help.Feature SuperdatFlag { get { - return new Feature( + return new Library.Help.Feature( SuperdatValue, new List() { "-sd", "--superdat" }, "Enable SuperDAT creation", @@ -1035,11 +1035,11 @@ namespace SabreTools.Features } internal const string TarValue = "tar"; - internal static Feature TarFlag + internal static Library.Help.Feature TarFlag { get { - return new Feature( + return new Library.Help.Feature( TarValue, new List() { "-tar", "--tar" }, "Enable Tape ARchive output", @@ -1049,11 +1049,11 @@ namespace SabreTools.Features } internal const string Torrent7zipValue = "torrent-7zip"; - internal static Feature Torrent7zipFlag + internal static Library.Help.Feature Torrent7zipFlag { get { - return new Feature( + return new Library.Help.Feature( Torrent7zipValue, new List() { "-t7z", "--torrent-7zip" }, "Enable Torrent7Zip output", @@ -1063,11 +1063,11 @@ namespace SabreTools.Features } internal const string TorrentGzipValue = "torrent-gzip"; - internal static Feature TorrentGzipFlag + internal static Library.Help.Feature TorrentGzipFlag { get { - return new Feature( + return new Library.Help.Feature( TorrentGzipValue, new List() { "-tgz", "--torrent-gzip" }, "Enable Torrent GZip output", @@ -1077,11 +1077,11 @@ namespace SabreTools.Features } internal const string TorrentZipValue = "torrent-zip"; - internal static Feature TorrentZipFlag + internal static Library.Help.Feature TorrentZipFlag { get { - return new Feature( + return new Library.Help.Feature( TorrentZipValue, new List() { "-tzip", "--torrent-zip" }, "Enable Torrent Zip output", @@ -1091,11 +1091,11 @@ namespace SabreTools.Features } internal const string TrimValue = "trim"; - internal static Feature TrimFlag + internal static Library.Help.Feature TrimFlag { get { - return new Feature( + return new Library.Help.Feature( TrimValue, new List() { "-trim", "--trim" }, "Trim file names to fit NTFS length", @@ -1105,11 +1105,11 @@ namespace SabreTools.Features } internal const string TypeValue = "type"; - internal static Feature TypeFlag + internal static Library.Help.Feature TypeFlag { get { - return new Feature( + return new Library.Help.Feature( TypeValue, new List() { "-ts", "--type" }, "Split DAT(s) or folder by file types (rom/disk)", @@ -1119,11 +1119,11 @@ namespace SabreTools.Features } internal const string UpdateDatValue = "update-dat"; - internal static Feature UpdateDatFlag + internal static Library.Help.Feature UpdateDatFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateDatValue, new List() { "-ud", "--update-dat" }, "Output updated DAT to output directory", @@ -1133,11 +1133,11 @@ namespace SabreTools.Features } internal const string UpdateDescriptionValue = "update-description"; - internal static Feature UpdateDescriptionFlag + internal static Library.Help.Feature UpdateDescriptionFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateDescriptionValue, new List() { "-udd", "--update-description" }, "Update machine descriptions from base DATs", @@ -1147,11 +1147,11 @@ namespace SabreTools.Features } internal const string UpdateGameTypeValue = "update-game-type"; - internal static Feature UpdateGameTypeFlag + internal static Library.Help.Feature UpdateGameTypeFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateGameTypeValue, new List() { "-ugt", "--update-game-type" }, "Update machine type from base DATs", @@ -1161,11 +1161,11 @@ namespace SabreTools.Features } internal const string UpdateHashesValue = "update-hashes"; - internal static Feature UpdateHashesFlag + internal static Library.Help.Feature UpdateHashesFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateHashesValue, new List() { "-uh", "--update-hashes" }, "Update hashes from base DATs", @@ -1175,11 +1175,11 @@ namespace SabreTools.Features } internal const string UpdateManufacturerValue = "update-manufacturer"; - internal static Feature UpdateManufacturerFlag + internal static Library.Help.Feature UpdateManufacturerFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateManufacturerValue, new List() { "-um", "--update-manufacturer" }, "Update machine manufacturers from base DATs", @@ -1189,11 +1189,11 @@ namespace SabreTools.Features } internal const string UpdateNamesValue = "update-names"; - internal static Feature UpdateNamesFlag + internal static Library.Help.Feature UpdateNamesFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateNamesValue, new List() { "-un", "--update-names" }, "Update item names from base DATs", @@ -1203,11 +1203,11 @@ namespace SabreTools.Features } internal const string UpdateParentsValue = "update-parents"; - internal static Feature UpdateParentsFlag + internal static Library.Help.Feature UpdateParentsFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateParentsValue, new List() { "-up", "--update-parents" }, "Update machine parents from base DATs", @@ -1217,11 +1217,11 @@ namespace SabreTools.Features } internal const string UpdateYearValue = "update-year"; - internal static Feature UpdateYearFlag + internal static Library.Help.Feature UpdateYearFlag { get { - return new Feature( + return new Library.Help.Feature( UpdateYearValue, new List() { "-uy", "--update-year" }, "Update machine years from base DATs", @@ -1235,11 +1235,11 @@ namespace SabreTools.Features #region Int32 features internal const string DepotDepthInt32Value = "depot-depth"; - internal static Feature DepotDepthInt32Input + internal static Library.Help.Feature DepotDepthInt32Input { get { - return new Feature( + return new Library.Help.Feature( DepotDepthInt32Value, new List() { "-depd", "--depot-depth" }, "Set depth of depot for inputs", @@ -1249,11 +1249,11 @@ namespace SabreTools.Features } internal const string RombaDepthInt32Value = "romba-depth"; - internal static Feature RombaDepthInt32Input + internal static Library.Help.Feature RombaDepthInt32Input { get { - return new Feature( + return new Library.Help.Feature( RombaDepthInt32Value, new List() { "-depr", "--romba-depth" }, "Set depth of depot for outputs", @@ -1263,11 +1263,11 @@ namespace SabreTools.Features } internal const string ThreadsInt32Value = "threads"; - internal static Feature ThreadsInt32Input + internal static Library.Help.Feature ThreadsInt32Input { get { - return new Feature( + return new Library.Help.Feature( ThreadsInt32Value, new List() { "-mt", "--threads" }, "Amount of threads to use (default = # cores)", @@ -1281,11 +1281,11 @@ namespace SabreTools.Features #region Int64 features internal const string RadixInt64Value = "radix"; - internal static Feature RadixInt64Input + internal static Library.Help.Feature RadixInt64Input { get { - return new Feature( + return new Library.Help.Feature( RadixInt64Value, new List() { "-rad", "--radix" }, "Set the midpoint to split at", @@ -1299,11 +1299,11 @@ namespace SabreTools.Features #region List features internal const string BaseDatListValue = "base-dat"; - internal static Feature BaseDatListInput + internal static Library.Help.Feature BaseDatListInput { get { - return new Feature( + return new Library.Help.Feature( BaseDatListValue, new List() { "-bd", "--base-dat" }, "Add a base DAT for processing", @@ -1313,11 +1313,11 @@ namespace SabreTools.Features } internal const string CategoryListValue = "category-filter"; - internal static Feature CategoryListInput + internal static Library.Help.Feature CategoryListInput { get { - return new Feature( + return new Library.Help.Feature( CategoryListValue, new List() { "-cat", "--category-filter" }, "Filter by Category", @@ -1327,11 +1327,11 @@ namespace SabreTools.Features } internal const string CrcListValue = "crc"; - internal static Feature CrcListInput + internal static Library.Help.Feature CrcListInput { get { - return new Feature( + return new Library.Help.Feature( CrcListValue, new List() { "-crc", "--crc" }, "Filter by CRC hash", @@ -1341,11 +1341,11 @@ namespace SabreTools.Features } internal const string DatListValue = "dat"; - internal static Feature DatListInput + internal static Library.Help.Feature DatListInput { get { - return new Feature( + return new Library.Help.Feature( DatListValue, new List() { "-dat", "--dat" }, "Input DAT to be used", @@ -1355,11 +1355,11 @@ namespace SabreTools.Features } internal const string ExcludeFieldListValue = "exclude-field"; - internal static Feature ExcludeFieldListInput + internal static Library.Help.Feature ExcludeFieldListInput { get { - return new Feature( + return new Library.Help.Feature( ExcludeFieldListValue, new List() { "-ef", "--exclude-field" }, "Exclude a game/rom field from outputs", @@ -1369,11 +1369,11 @@ namespace SabreTools.Features } internal const string ExtAListValue = "exta"; - internal static Feature ExtaListInput + internal static Library.Help.Feature ExtaListInput { get { - return new Feature( + return new Library.Help.Feature( ExtAListValue, new List() { "-exta", "--exta" }, "Set extension to be included in first DAT", @@ -1383,11 +1383,11 @@ namespace SabreTools.Features } internal const string ExtBListValue = "extb"; - internal static Feature ExtbListInput + internal static Library.Help.Feature ExtbListInput { get { - return new Feature( + return new Library.Help.Feature( ExtBListValue, new List() { "-extb", "--extb" }, "Set extension to be included in second DAT", @@ -1397,11 +1397,11 @@ namespace SabreTools.Features } internal const string ExtraIniListValue = "extra-ini"; - internal static Feature ExtraIniListInput + internal static Library.Help.Feature ExtraIniListInput { get { - return new Feature( + return new Library.Help.Feature( ExtraIniListValue, new List() { "-ini", "--extra-ini" }, "Apply a MAME INI for given field(s)", @@ -1411,11 +1411,11 @@ namespace SabreTools.Features } internal const string FilterListValue = "filter"; - internal static Feature FilterListInput + internal static Library.Help.Feature FilterListInput { get { - return new Feature( + return new Library.Help.Feature( FilterListValue, new List() { "-fi", "--filter" }, "Filter a game/rom field with the given value(s)", @@ -1425,11 +1425,11 @@ namespace SabreTools.Features } internal const string GameDescriptionListValue = "game-description"; - internal static Feature GameDescriptionListInput + internal static Library.Help.Feature GameDescriptionListInput { get { - return new Feature( + return new Library.Help.Feature( GameDescriptionListValue, new List() { "-gd", "--game-description" }, "Filter by game description", @@ -1439,11 +1439,11 @@ namespace SabreTools.Features } internal const string GameNameListValue = "game-name"; - internal static Feature GameNameListInput + internal static Library.Help.Feature GameNameListInput { get { - return new Feature( + return new Library.Help.Feature( GameNameListValue, new List() { "-gn", "--game-name" }, "Filter by game name", @@ -1453,11 +1453,11 @@ namespace SabreTools.Features } internal const string GameTypeListValue = "game-type"; - internal static Feature GameTypeListInput + internal static Library.Help.Feature GameTypeListInput { get { - return new Feature( + return new Library.Help.Feature( GameTypeListValue, new List() { "-gt", "--game-type" }, "Include only games with a given type", @@ -1468,11 +1468,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string ItemNameListValue = "item-name"; - internal static Feature ItemNameListInput + internal static Library.Help.Feature ItemNameListInput { get { - return new Feature( + return new Library.Help.Feature( ItemNameListValue, new List() { "-rn", "--item-name" }, "Filter by item name", @@ -1482,11 +1482,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string ItemTypeListValue = "item-type"; - internal static Feature ItemTypeListInput + internal static Library.Help.Feature ItemTypeListInput { get { - return new Feature( + return new Library.Help.Feature( ItemTypeListValue, new List() { "-rt", "--item-type" }, "Filter by item type", @@ -1496,11 +1496,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string Md5ListValue = "md5"; - internal static Feature Md5ListInput + internal static Library.Help.Feature Md5ListInput { get { - return new Feature( + return new Library.Help.Feature( Md5ListValue, new List() { "-md5", "--md5" }, "Filter by MD5 hash", @@ -1510,11 +1510,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotCategoryListValue = "not-category"; - internal static Feature NotCategoryListInput + internal static Library.Help.Feature NotCategoryListInput { get { - return new Feature( + return new Library.Help.Feature( NotCategoryListValue, new List() { "-ncat", "--not-category" }, "Filter by not Category", @@ -1524,11 +1524,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotCrcListValue = "not-crc"; - internal static Feature NotCrcListInput + internal static Library.Help.Feature NotCrcListInput { get { - return new Feature( + return new Library.Help.Feature( NotCrcListValue, new List() { "-ncrc", "--not-crc" }, "Filter by not CRC hash", @@ -1538,11 +1538,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotGameDescriptionListValue = "not-game-description"; - internal static Feature NotGameDescriptionListInput + internal static Library.Help.Feature NotGameDescriptionListInput { get { - return new Feature( + return new Library.Help.Feature( NotGameDescriptionListValue, new List() { "-ngd", "--not-game-description" }, "Filter by not game description", @@ -1552,11 +1552,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotGameNameListValue = "not-game-name"; - internal static Feature NotGameNameListInput + internal static Library.Help.Feature NotGameNameListInput { get { - return new Feature( + return new Library.Help.Feature( NotGameNameListValue, new List() { "-ngn", "--not-game-name" }, "Filter by not game name", @@ -1566,11 +1566,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotGameTypeListValue = "not-game-type"; - internal static Feature NotGameTypeListInput + internal static Library.Help.Feature NotGameTypeListInput { get { - return new Feature( + return new Library.Help.Feature( NotGameTypeListValue, new List() { "-ngt", "--not-game-type" }, "Exclude only games with a given type", @@ -1581,11 +1581,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotItemNameListValue = "not-item-name"; - internal static Feature NotItemNameListInput + internal static Library.Help.Feature NotItemNameListInput { get { - return new Feature( + return new Library.Help.Feature( NotItemNameListValue, new List() { "-nrn", "--not-item-name" }, "Filter by not item name", @@ -1595,11 +1595,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotItemTypeListValue = "not-item-type"; - internal static Feature NotItemTypeListInput + internal static Library.Help.Feature NotItemTypeListInput { get { - return new Feature( + return new Library.Help.Feature( NotItemTypeListValue, new List() { "-nrt", "--not-item-type" }, "Filter by not item type", @@ -1609,11 +1609,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotMd5ListValue = "not-md5"; - internal static Feature NotMd5ListInput + internal static Library.Help.Feature NotMd5ListInput { get { - return new Feature( + return new Library.Help.Feature( NotMd5ListValue, new List() { "-nmd5", "--not-md5" }, "Filter by not MD5 hash", @@ -1624,11 +1624,11 @@ Possible values are: None, Bios, Device, Mechanical"); #if NET_FRAMEWORK internal const string NotRipeMd160ListValue = "not-ripemd160"; - internal static Feature NotRipeMd160ListInput + internal static Library.Help.Feature NotRipeMd160ListInput { get { - return new Feature( + return new Library.Help.Feature( NotRipeMd160ListValue, new List() { "-nripemd160", "--not-ripemd160" }, "Filter by not RIPEMD160 hash", @@ -1639,11 +1639,11 @@ Possible values are: None, Bios, Device, Mechanical"); #endif internal const string NotSha1ListValue = "not-sha1"; - internal static Feature NotSha1ListInput + internal static Library.Help.Feature NotSha1ListInput { get { - return new Feature( + return new Library.Help.Feature( NotSha1ListValue, new List() { "-nsha1", "--not-sha1" }, "Filter by not SHA-1 hash", @@ -1653,11 +1653,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotSha256ListValue = "not-sha256"; - internal static Feature NotSha256ListInput + internal static Library.Help.Feature NotSha256ListInput { get { - return new Feature( + return new Library.Help.Feature( NotSha256ListValue, new List() { "-nsha256", "--not-sha256" }, "Filter by not SHA-256 hash", @@ -1667,11 +1667,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotSha384ListValue = "not-sha384"; - internal static Feature NotSha384ListInput + internal static Library.Help.Feature NotSha384ListInput { get { - return new Feature( + return new Library.Help.Feature( NotSha384ListValue, new List() { "-nsha384", "--not-sha384" }, "Filter by not SHA-384 hash", @@ -1681,11 +1681,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotSha512ListValue = "not-sha512"; - internal static Feature NotSha512ListInput + internal static Library.Help.Feature NotSha512ListInput { get { - return new Feature( + return new Library.Help.Feature( NotSha512ListValue, new List() { "-nsha512", "--not-sha512" }, "Filter by not SHA-512 hash", @@ -1695,11 +1695,11 @@ Possible values are: None, Bios, Device, Mechanical"); } internal const string NotStatusListValue = "not-status"; - internal static Feature NotStatusListInput + internal static Library.Help.Feature NotStatusListInput { get { - return new Feature( + return new Library.Help.Feature( NotStatusListValue, new List() { "-nis", "--not-status" }, "Exclude only items with a given status", @@ -1710,11 +1710,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string OutputTypeListValue = "output-type"; - internal static Feature OutputTypeListInput + internal static Library.Help.Feature OutputTypeListInput { get { - return new Feature( + return new Library.Help.Feature( OutputTypeListValue, new List() { "-ot", "--output-type" }, "Output DATs to a specified format", @@ -1755,11 +1755,11 @@ Possible values are: } internal const string RegionListValue = "region"; - internal static Feature RegionListInput + internal static Library.Help.Feature RegionListInput { get { - return new Feature( + return new Library.Help.Feature( RegionListValue, new List() { "-reg", "--region" }, "Add a region for 1G1R", @@ -1769,11 +1769,11 @@ Possible values are: } internal const string ReportTypeListValue = "report-type"; - internal static Feature ReportTypeListInput + internal static Library.Help.Feature ReportTypeListInput { get { - return new Feature( + return new Library.Help.Feature( ReportTypeListValue, new List() { "-srt", "--report-type" }, "Output statistics to a specified format", @@ -1792,11 +1792,11 @@ Possible values are: #if NET_FRAMEWORK internal const string RipeMd160ListValue = "ripemd160"; - internal static Feature RipeMd160ListInput + internal static Library.Help.Feature RipeMd160ListInput { get { - return new Feature( + return new Library.Help.Feature( RipeMd160ListValue, new List() { "-ripemd160", "--ripemd160" }, "Filter by RIPEMD160 hash", @@ -1807,11 +1807,11 @@ Possible values are: #endif internal const string Sha1ListValue = "sha1"; - internal static Feature Sha1ListInput + internal static Library.Help.Feature Sha1ListInput { get { - return new Feature( + return new Library.Help.Feature( Sha1ListValue, new List() { "-sha1", "--sha1" }, "Filter by SHA-1 hash", @@ -1821,11 +1821,11 @@ Possible values are: } internal const string Sha256ListValue = "sha256"; - internal static Feature Sha256ListInput + internal static Library.Help.Feature Sha256ListInput { get { - return new Feature( + return new Library.Help.Feature( Sha256ListValue, new List() { "-sha256", "--sha256" }, "Filter by SHA-256 hash", @@ -1835,11 +1835,11 @@ Possible values are: } internal const string Sha384ListValue = "sha384"; - internal static Feature Sha384ListInput + internal static Library.Help.Feature Sha384ListInput { get { - return new Feature( + return new Library.Help.Feature( Sha384ListValue, new List() { "-sha384", "--sha384" }, "Filter by SHA-384 hash", @@ -1849,11 +1849,11 @@ Possible values are: } internal const string Sha512ListValue = "sha512"; - internal static Feature Sha512ListInput + internal static Library.Help.Feature Sha512ListInput { get { - return new Feature( + return new Library.Help.Feature( Sha512ListValue, new List() { "-sha512", "--sha512" }, "Filter by SHA-512 hash", @@ -1863,11 +1863,11 @@ Possible values are: } internal const string StatusListValue = "status"; - internal static Feature StatusListInput + internal static Library.Help.Feature StatusListInput { get { - return new Feature( + return new Library.Help.Feature( StatusListValue, new List() { "-is", "--status" }, "Include only items with a given status", @@ -1878,11 +1878,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string UpdateFieldListValue = "update-field"; - internal static Feature UpdateFieldListInput + internal static Library.Help.Feature UpdateFieldListInput { get { - return new Feature( + return new Library.Help.Feature( UpdateFieldListValue, new List() { "-uf", "--update-field" }, "Update a game/rom field from base DATs", @@ -1896,11 +1896,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); #region String features internal const string AddExtensionStringValue = "add-extension"; - internal static Feature AddExtensionStringInput + internal static Library.Help.Feature AddExtensionStringInput { get { - return new Feature( + return new Library.Help.Feature( AddExtensionStringValue, new List() { "-ae", "--add-extension" }, "Add an extension to each item", @@ -1910,11 +1910,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string AuthorStringValue = "author"; - internal static Feature AuthorStringInput + internal static Library.Help.Feature AuthorStringInput { get { - return new Feature( + return new Library.Help.Feature( AuthorStringValue, new List() { "-au", "--author" }, "Set the author of the DAT", @@ -1924,11 +1924,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string CategoryStringValue = "category"; - internal static Feature CategoryStringInput + internal static Library.Help.Feature CategoryStringInput { get { - return new Feature( + return new Library.Help.Feature( CategoryStringValue, new List() { "-c", "--category" }, "Set the category of the DAT", @@ -1938,11 +1938,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string CommentStringValue = "comment"; - internal static Feature CommentStringInput + internal static Library.Help.Feature CommentStringInput { get { - return new Feature( + return new Library.Help.Feature( CommentStringValue, new List() { "-co", "--comment" }, "Set a new comment of the DAT", @@ -1952,11 +1952,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string DateStringValue = "date"; - internal static Feature DateStringInput + internal static Library.Help.Feature DateStringInput { get { - return new Feature( + return new Library.Help.Feature( DateStringValue, new List() { "-da", "--date" }, "Set a new date", @@ -1966,11 +1966,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string DescriptionStringValue = "description"; - internal static Feature DescriptionStringInput + internal static Library.Help.Feature DescriptionStringInput { get { - return new Feature( + return new Library.Help.Feature( DescriptionStringValue, new List() { "-de", "--description" }, "Set the description of the DAT", @@ -1980,11 +1980,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string EmailStringValue = "email"; - internal static Feature EmailStringInput + internal static Library.Help.Feature EmailStringInput { get { - return new Feature( + return new Library.Help.Feature( EmailStringValue, new List() { "-em", "--email" }, "Set a new email of the DAT", @@ -1994,11 +1994,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string EqualStringValue = "equal"; - internal static Feature EqualStringInput + internal static Library.Help.Feature EqualStringInput { get { - return new Feature( + return new Library.Help.Feature( EqualStringValue, new List() { "-seq", "--equal" }, "Filter by size ==", @@ -2008,11 +2008,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string FilenameStringValue = "filename"; - internal static Feature FilenameStringInput + internal static Library.Help.Feature FilenameStringInput { get { - return new Feature( + return new Library.Help.Feature( FilenameStringValue, new List() { "-f", "--filename" }, "Set the external name of the DAT", @@ -2022,11 +2022,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); } internal const string ForceMergingStringValue = "forcemerging"; - internal static Feature ForceMergingStringInput + internal static Library.Help.Feature ForceMergingStringInput { get { - return new Feature( + return new Library.Help.Feature( ForceMergingStringValue, new List() { "-fm", "--forcemerging" }, "Set force merging", @@ -2037,11 +2037,11 @@ Possible values are: None, Split, Device, Merged, Nonmerged, Full"); } internal const string ForceNodumpStringValue = "forcenodump"; - internal static Feature ForceNodumpStringInput + internal static Library.Help.Feature ForceNodumpStringInput { get { - return new Feature( + return new Library.Help.Feature( ForceNodumpStringValue, new List() { "-fn", "--forcenodump" }, "Set force nodump", @@ -2052,11 +2052,11 @@ Possible values are: None, Obsolete, Required, Ignore"); } internal const string ForcePackingStringValue = "forcepacking"; - internal static Feature ForcePackingStringInput + internal static Library.Help.Feature ForcePackingStringInput { get { - return new Feature( + return new Library.Help.Feature( ForcePackingStringValue, new List() { "-fp", "--forcepacking" }, "Set force packing", @@ -2067,11 +2067,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string GreaterStringValue = "greater"; - internal static Feature GreaterStringInput + internal static Library.Help.Feature GreaterStringInput { get { - return new Feature( + return new Library.Help.Feature( GreaterStringValue, new List() { "-sgt", "--greater" }, "Filter by size >=", @@ -2081,11 +2081,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string HeaderStringValue = "header"; - internal static Feature HeaderStringInput + internal static Library.Help.Feature HeaderStringInput { get { - return new Feature( + return new Library.Help.Feature( HeaderStringValue, new List() { "-h", "--header" }, "Set a header skipper to use, blank means all", @@ -2096,11 +2096,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string HomepageStringValue = "homepage"; - internal static Feature HomepageStringInput + internal static Library.Help.Feature HomepageStringInput { get { - return new Feature( + return new Library.Help.Feature( HomepageStringValue, new List() { "-hp", "--homepage" }, "Set a new homepage of the DAT", @@ -2110,11 +2110,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string LessStringValue = "less"; - internal static Feature LessStringInput + internal static Library.Help.Feature LessStringInput { get { - return new Feature( + return new Library.Help.Feature( LessStringValue, new List() { "-slt", "--less" }, "Filter by size =<", @@ -2124,11 +2124,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string NameStringValue = "name"; - internal static Feature NameStringInput + internal static Library.Help.Feature NameStringInput { get { - return new Feature( + return new Library.Help.Feature( NameStringValue, new List() { "-n", "--name" }, "Set the internal name of the DAT", @@ -2138,11 +2138,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string OutputDirStringValue = "output-dir"; - internal static Feature OutputDirStringInput + internal static Library.Help.Feature OutputDirStringInput { get { - return new Feature( + return new Library.Help.Feature( OutputDirStringValue, new List() { "-out", "--output-dir" }, "Output directory", @@ -2152,11 +2152,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat"); } internal const string PostfixStringValue = "postfix"; - internal static Feature PostfixStringInput + internal static Library.Help.Feature PostfixStringInput { get { - return new Feature( + return new Library.Help.Feature( PostfixStringValue, new List() { "-post", "--postfix" }, "Set postfix for all lines", @@ -2185,11 +2185,11 @@ Some special strings that can be used: } internal const string PrefixStringValue = "prefix"; - internal static Feature PrefixStringInput + internal static Library.Help.Feature PrefixStringInput { get { - return new Feature( + return new Library.Help.Feature( PrefixStringValue, new List() { "-pre", "--prefix" }, "Set prefix for all lines", @@ -2213,11 +2213,11 @@ Some special strings that can be used: } internal const string ReplaceExtensionStringValue = "replace-extension"; - internal static Feature ReplaceExtensionStringInput + internal static Library.Help.Feature ReplaceExtensionStringInput { get { - return new Feature( + return new Library.Help.Feature( ReplaceExtensionStringValue, new List() { "-rep", "--replace-extension" }, "Replace all extensions with specified", @@ -2227,11 +2227,11 @@ Some special strings that can be used: } internal const string RootStringValue = "root"; - internal static Feature RootStringInput + internal static Library.Help.Feature RootStringInput { get { - return new Feature( + return new Library.Help.Feature( RootStringValue, new List() { "-r", "--root" }, "Set a new rootdir", @@ -2241,11 +2241,11 @@ Some special strings that can be used: } internal const string RootDirStringValue = "root-dir"; - internal static Feature RootDirStringInput + internal static Library.Help.Feature RootDirStringInput { get { - return new Feature( + return new Library.Help.Feature( RootDirStringValue, new List() { "-rd", "--root-dir" }, "Set the root directory for calc", @@ -2255,11 +2255,11 @@ Some special strings that can be used: } internal const string TempStringValue = "temp"; - internal static Feature TempStringInput + internal static Library.Help.Feature TempStringInput { get { - return new Feature( + return new Library.Help.Feature( TempStringValue, new List() { "-t", "--temp" }, "Set the temporary directory to use", @@ -2269,11 +2269,11 @@ Some special strings that can be used: } internal const string UrlStringValue = "url"; - internal static Feature UrlStringInput + internal static Library.Help.Feature UrlStringInput { get { - return new Feature( + return new Library.Help.Feature( UrlStringValue, new List() { "-u", "--url" }, "Set a new URL of the DAT", @@ -2283,11 +2283,11 @@ Some special strings that can be used: } internal const string VersionStringValue = "version"; - internal static Feature VersionStringInput + internal static Library.Help.Feature VersionStringInput { get { - return new Feature( + return new Library.Help.Feature( VersionStringValue, new List() { "-v", "--version" }, "Set the version of the DAT", @@ -2421,7 +2421,7 @@ Some special strings that can be used: #endregion - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { // Generic feature flags Cleaner = GetCleaner(features); @@ -2444,7 +2444,7 @@ Some special strings that can be used: /// /// Get omit from scan from feature list /// - protected Hash GetOmitFromScan(Dictionary features) + protected Hash GetOmitFromScan(Dictionary features) { Hash omitFromScan = Hash.DeepHashes; // TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually @@ -2469,7 +2469,7 @@ Some special strings that can be used: /// /// Get OutputFormat from feature list /// - protected OutputFormat GetOutputFormat(Dictionary features) + protected OutputFormat GetOutputFormat(Dictionary features) { if (GetBoolean(features, TarValue)) return OutputFormat.TapeArchive; @@ -2498,7 +2498,7 @@ Some special strings that can be used: /// /// Get SkipFileType from feature list /// - protected SkipFileType GetSkipFileType(Dictionary features) + protected SkipFileType GetSkipFileType(Dictionary features) { if (GetBoolean(features, SkipArchivesValue)) return SkipFileType.Archive; @@ -2511,7 +2511,7 @@ Some special strings that can be used: /// /// Get SplittingMode from feature list /// - protected SplittingMode GetSplittingMode(Dictionary features) + protected SplittingMode GetSplittingMode(Dictionary features) { SplittingMode splittingMode = SplittingMode.None; @@ -2532,7 +2532,7 @@ Some special strings that can be used: /// /// Get SplitType from feature list /// - protected MergingFlag GetSplitType(Dictionary features) + protected MergingFlag GetSplitType(Dictionary features) { MergingFlag splitType = MergingFlag.None; if (GetBoolean(features, DatDeviceNonMergedValue)) @@ -2552,7 +2552,7 @@ Some special strings that can be used: /// /// Get StatReportFormat from feature list /// - protected StatReportFormat GetStatReportFormat(Dictionary features) + protected StatReportFormat GetStatReportFormat(Dictionary features) { StatReportFormat statDatFormat = StatReportFormat.None; @@ -2567,7 +2567,7 @@ Some special strings that can be used: /// /// Get TreatAsFiles from feature list /// - protected TreatAsFiles GetTreatAsFiles(Dictionary features) + protected TreatAsFiles GetTreatAsFiles(Dictionary features) { TreatAsFiles asFiles = 0x00; if (GetBoolean(features, AaruFormatsAsFilesValue)) @@ -2583,7 +2583,7 @@ Some special strings that can be used: /// /// Get update fields from feature list /// - protected List GetUpdateFields(Dictionary features) + protected List GetUpdateFields(Dictionary features) { List updateFields = new List(); @@ -2650,7 +2650,7 @@ Some special strings that can be used: /// /// Get UpdateMode from feature list /// - protected UpdateMode GetUpdateMode(Dictionary features) + protected UpdateMode GetUpdateMode(Dictionary features) { UpdateMode updateMode = UpdateMode.None; @@ -2694,7 +2694,7 @@ Some special strings that can be used: /// /// Get Cleaner from feature list /// - private Cleaner GetCleaner(Dictionary features) + private Cleaner GetCleaner(Dictionary features) { Cleaner cleaner = new Cleaner() { @@ -2723,7 +2723,7 @@ Some special strings that can be used: /// /// Get DatHeader from feature list /// - private DatHeader GetDatHeader(Dictionary features) + private DatHeader GetDatHeader(Dictionary features) { // TODO: Sort this by region, like the actual header DatHeader datHeader = new DatHeader @@ -2779,7 +2779,7 @@ Some special strings that can be used: /// /// Get DedupeType from feature list /// - private DedupeType GetDedupeType(Dictionary features) + private DedupeType GetDedupeType(Dictionary features) { if (GetBoolean(features, DedupValue)) return DedupeType.Full; @@ -2792,7 +2792,7 @@ Some special strings that can be used: /// /// Get ExtraIni from feature list /// - private ExtraIni GetExtras(Dictionary features) + private ExtraIni GetExtras(Dictionary features) { ExtraIni extraIni = new ExtraIni(); extraIni.PopulateFromList(GetList(features, ExtraIniListValue)); @@ -2802,7 +2802,7 @@ Some special strings that can be used: /// /// Get Filter from feature list /// - private Filter GetFilter(Dictionary features) + private Filter GetFilter(Dictionary features) { Filter filter = new Filter(); diff --git a/SabreTools/Features/Batch.cs b/SabreTools/Features/Batch.cs index aa43cded..cecb4cba 100644 --- a/SabreTools/Features/Batch.cs +++ b/SabreTools/Features/Batch.cs @@ -43,10 +43,10 @@ Add new output format(s): format(datformat, ...); Set the output directory: output(outdir); Write the internal items: write([overwrite = true]); Reset the internal state: reset();"; - Features = new Dictionary(); + Features = new Dictionary(); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); diff --git a/SabreTools/Features/Split.cs b/SabreTools/Features/Split.cs index 05f487d1..4c15be49 100644 --- a/SabreTools/Features/Split.cs +++ b/SabreTools/Features/Split.cs @@ -21,7 +21,7 @@ namespace SabreTools.Features Description = "Split input DATs by a given criteria"; _featureType = FeatureType.Flag; LongDescription = "This feature allows the user to split input DATs by a number of different possible criteria. See the individual input information for details. More than one split type is allowed at a time."; - Features = new Dictionary(); + Features = new Dictionary(); AddFeature(OutputTypeListInput); this[OutputTypeListInput].AddFeature(DeprecatedFlag); @@ -39,7 +39,7 @@ namespace SabreTools.Features AddFeature(TypeFlag); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); SplittingMode splittingMode = GetSplittingMode(features); diff --git a/SabreTools/Features/Update.cs b/SabreTools/Features/Update.cs index 39edb7ec..e7cba571 100644 --- a/SabreTools/Features/Update.cs +++ b/SabreTools/Features/Update.cs @@ -23,7 +23,7 @@ namespace SabreTools.Features Description = "Update and manipulate DAT(s)"; _featureType = FeatureType.Flag; LongDescription = "This is the multitool part of the program, allowing for almost every manipulation to a DAT, or set of DATs. This is also a combination of many different programs that performed DAT manipulation that work better together."; - Features = new Dictionary(); + Features = new Dictionary(); // Output Formats AddFeature(OutputTypeListInput); @@ -98,7 +98,7 @@ namespace SabreTools.Features AddFeature(ThreadsInt32Input); } - public override void ProcessFeatures(Dictionary features) + public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features);