mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Create and use NoFilter attribute
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using SabreTools.Models;
|
||||||
using SabreTools.Models.Internal;
|
using SabreTools.Models.Internal;
|
||||||
|
|
||||||
namespace SabreTools.Filter
|
namespace SabreTools.Filter
|
||||||
@@ -55,16 +56,8 @@ namespace SabreTools.Filter
|
|||||||
if (constantMatch == null)
|
if (constantMatch == null)
|
||||||
return (null, null);
|
return (null, null);
|
||||||
|
|
||||||
// Filter out fields that can't be matched on
|
// Return the sanitized ID
|
||||||
return constantMatch switch
|
return (MetadataFile.HeaderKey, constantMatch);
|
||||||
{
|
|
||||||
Header.CanOpenKey => (null, null),
|
|
||||||
Header.ImagesKey => (null, null),
|
|
||||||
Header.InfosKey => (null, null),
|
|
||||||
Header.NewDatKey => (null, null),
|
|
||||||
Header.SearchKey => (null, null),
|
|
||||||
_ => (MetadataFile.HeaderKey, constantMatch),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -82,46 +75,13 @@ namespace SabreTools.Filter
|
|||||||
if (constantMatch == null)
|
if (constantMatch == null)
|
||||||
return (null, null);
|
return (null, null);
|
||||||
|
|
||||||
// Filter out fields that can't be matched on
|
// Return the sanitized ID
|
||||||
return constantMatch switch
|
return (MetadataFile.MachineKey, constantMatch);
|
||||||
{
|
|
||||||
Machine.AdjusterKey => (null, null),
|
|
||||||
Machine.ArchiveKey => (null, null),
|
|
||||||
Machine.BiosSetKey => (null, null),
|
|
||||||
Machine.ChipKey => (null, null),
|
|
||||||
Machine.ConfigurationKey => (null, null),
|
|
||||||
Machine.ControlKey => (null, null),
|
|
||||||
Machine.DeviceKey => (null, null),
|
|
||||||
Machine.DeviceRefKey => (null, null),
|
|
||||||
Machine.DipSwitchKey => (null, null),
|
|
||||||
Machine.DiskKey => (null, null),
|
|
||||||
Machine.DisplayKey => (null, null),
|
|
||||||
Machine.DriverKey => (null, null),
|
|
||||||
Machine.DumpKey => (null, null),
|
|
||||||
Machine.FeatureKey => (null, null),
|
|
||||||
Machine.InfoKey => (null, null),
|
|
||||||
Machine.InputKey => (null, null),
|
|
||||||
Machine.MediaKey => (null, null),
|
|
||||||
Machine.PartKey => (null, null),
|
|
||||||
Machine.PortKey => (null, null),
|
|
||||||
Machine.RamOptionKey => (null, null),
|
|
||||||
Machine.ReleaseKey => (null, null),
|
|
||||||
Machine.RomKey => (null, null),
|
|
||||||
Machine.SampleKey => (null, null),
|
|
||||||
Machine.SharedFeatKey => (null, null),
|
|
||||||
Machine.SlotKey => (null, null),
|
|
||||||
Machine.SoftwareListKey => (null, null),
|
|
||||||
Machine.SoundKey => (null, null),
|
|
||||||
Machine.TruripKey => (null, null),
|
|
||||||
Machine.VideoKey => (null, null),
|
|
||||||
_ => (MetadataFile.MachineKey, constantMatch),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get constant values for the given type, if possible
|
/// Get constant values for the given type, if possible
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>TODO: Create a NoFilter attribute for non-mappable filter IDs</remarks>
|
|
||||||
private static string[]? GetConstants(Type? type)
|
private static string[]? GetConstants(Type? type)
|
||||||
{
|
{
|
||||||
if (type == null)
|
if (type == null)
|
||||||
@@ -133,6 +93,7 @@ namespace SabreTools.Filter
|
|||||||
|
|
||||||
return fields
|
return fields
|
||||||
.Where(f => f.IsLiteral && !f.IsInitOnly)
|
.Where(f => f.IsLiteral && !f.IsInitOnly)
|
||||||
|
.Where(f => f.CustomAttributes.Any(a => a.AttributeType == typeof(NoFilterAttribute)))
|
||||||
.Select(f => f.GetRawConstantValue() as string)
|
.Select(f => f.GetRawConstantValue() as string)
|
||||||
.Where(v => v != null)
|
.Where(v => v != null)
|
||||||
.ToArray()!;
|
.ToArray()!;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
// <remarks>Condition</remarks>
|
// <remarks>Condition</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConditionKey = "condition";
|
public const string ConditionKey = "condition";
|
||||||
|
|
||||||
/// <remarks>bool</remarks>
|
/// <remarks>bool</remarks>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Condition</remarks>
|
/// <remarks>Condition</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConditionKey = "condition";
|
public const string ConditionKey = "condition";
|
||||||
|
|
||||||
/// <remarks>(yes|no) "no"</remarks>
|
/// <remarks>(yes|no) "no"</remarks>
|
||||||
|
|||||||
@@ -9,12 +9,15 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Condition</remarks>
|
/// <remarks>Condition</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConditionKey = "condition";
|
public const string ConditionKey = "condition";
|
||||||
|
|
||||||
/// <remarks>ConfLocation[]</remarks>
|
/// <remarks>ConfLocation[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConfLocationKey = "conflocation";
|
public const string ConfLocationKey = "conflocation";
|
||||||
|
|
||||||
/// <remarks>ConfSetting[]</remarks>
|
/// <remarks>ConfSetting[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConfSettingKey = "confsetting";
|
public const string ConfSettingKey = "confsetting";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string NameKey = "name";
|
public const string NameKey = "name";
|
||||||
|
|
||||||
/// <remarks>Rom[]</remarks>
|
/// <remarks>Rom[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string RomKey = "rom";
|
public const string RomKey = "rom";
|
||||||
|
|
||||||
/// <remarks>long</remarks>
|
/// <remarks>long</remarks>
|
||||||
|
|||||||
@@ -9,12 +9,14 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Extension[]</remarks>
|
/// <remarks>Extension[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ExtensionKey = "extension";
|
public const string ExtensionKey = "extension";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string FixedImageKey = "fixed_image";
|
public const string FixedImageKey = "fixed_image";
|
||||||
|
|
||||||
/// <remarks>Instance</remarks>
|
/// <remarks>Instance</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string InstanceKey = "instance";
|
public const string InstanceKey = "instance";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -9,15 +9,18 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Condition</remarks>
|
/// <remarks>Condition</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConditionKey = "condition";
|
public const string ConditionKey = "condition";
|
||||||
|
|
||||||
/// <remarks>(yes|no) "no"</remarks>
|
/// <remarks>(yes|no) "no"</remarks>
|
||||||
public const string DefaultKey = "default";
|
public const string DefaultKey = "default";
|
||||||
|
|
||||||
/// <remarks>DipLocation[]</remarks>
|
/// <remarks>DipLocation[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DipLocationKey = "diplocation";
|
public const string DipLocationKey = "diplocation";
|
||||||
|
|
||||||
/// <remarks>DipValue[]</remarks>
|
/// <remarks>DipValue[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DipValueKey = "dipvalue";
|
public const string DipValueKey = "dipvalue";
|
||||||
|
|
||||||
/// <remarks>string[]</remarks>
|
/// <remarks>string[]</remarks>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Condition</remarks>
|
/// <remarks>Condition</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConditionKey = "condition";
|
public const string ConditionKey = "condition";
|
||||||
|
|
||||||
/// <remarks>(yes|no) "no"</remarks>
|
/// <remarks>(yes|no) "no"</remarks>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Disk[]</remarks>
|
/// <remarks>Disk[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DiskKey = "disk";
|
public const string DiskKey = "disk";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -9,15 +9,19 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Rom</remarks>
|
/// <remarks>Rom</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string MegaRomKey = "megarom";
|
public const string MegaRomKey = "megarom";
|
||||||
|
|
||||||
/// <remarks>Original</remarks>
|
/// <remarks>Original</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string OriginalKey = "original";
|
public const string OriginalKey = "original";
|
||||||
|
|
||||||
/// <remarks>Rom</remarks>
|
/// <remarks>Rom</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string RomKey = "rom";
|
public const string RomKey = "rom";
|
||||||
|
|
||||||
/// <remarks>Rom</remarks>
|
/// <remarks>Rom</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SCCPlusCartKey = "sccpluscart";
|
public const string SCCPlusCartKey = "sccpluscart";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>CanOpen</remarks>
|
/// <remarks>CanOpen</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string CanOpenKey = "canOpen";
|
public const string CanOpenKey = "canOpen";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -67,6 +68,7 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>Search</remarks>
|
/// <remarks>Search</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ImagesKey = "images";
|
public const string ImagesKey = "images";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -74,6 +76,7 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>Infos</remarks>
|
/// <remarks>Infos</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string InfosKey = "infos";
|
public const string InfosKey = "infos";
|
||||||
|
|
||||||
/// <remarks>(yes|no) "no"</remarks>
|
/// <remarks>(yes|no) "no"</remarks>
|
||||||
@@ -93,6 +96,7 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>NewDat</remarks>
|
/// <remarks>NewDat</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string NewDatKey = "newDat";
|
public const string NewDatKey = "newDat";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -127,6 +131,7 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>Search</remarks>
|
/// <remarks>Search</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SearchKey = "search";
|
public const string SearchKey = "search";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -8,12 +8,15 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Adjuster[]</remarks>
|
/// <remarks>Adjuster[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string AdjusterKey = "adjuster";
|
public const string AdjusterKey = "adjuster";
|
||||||
|
|
||||||
/// <remarks>Archive[]</remarks>
|
/// <remarks>Archive[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ArchiveKey = "archive";
|
public const string ArchiveKey = "archive";
|
||||||
|
|
||||||
/// <remarks>BiosSet[]</remarks>
|
/// <remarks>BiosSet[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string BiosSetKey = "biosset";
|
public const string BiosSetKey = "biosset";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -26,6 +29,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string CategoryKey = "category";
|
public const string CategoryKey = "category";
|
||||||
|
|
||||||
/// <remarks>Chip[]</remarks>
|
/// <remarks>Chip[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ChipKey = "chip";
|
public const string ChipKey = "chip";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -41,6 +45,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string CompanyKey = "company";
|
public const string CompanyKey = "company";
|
||||||
|
|
||||||
/// <remarks>Configuration[]</remarks>
|
/// <remarks>Configuration[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ConfigurationKey = "configuration";
|
public const string ConfigurationKey = "configuration";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -53,33 +58,40 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string DescriptionKey = "description";
|
public const string DescriptionKey = "description";
|
||||||
|
|
||||||
/// <remarks>Device[]</remarks>
|
/// <remarks>Device[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DeviceKey = "device";
|
public const string DeviceKey = "device";
|
||||||
|
|
||||||
/// <remarks>DeviceRef[]</remarks>
|
/// <remarks>DeviceRef[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DeviceRefKey = "device_ref";
|
public const string DeviceRefKey = "device_ref";
|
||||||
|
|
||||||
/// <remarks>DipSwitch[]</remarks>
|
/// <remarks>DipSwitch[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DipSwitchKey = "dipswitch";
|
public const string DipSwitchKey = "dipswitch";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string DirNameKey = "dirName";
|
public const string DirNameKey = "dirName";
|
||||||
|
|
||||||
/// <remarks>Disk[]</remarks>
|
/// <remarks>Disk[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DiskKey = "disk";
|
public const string DiskKey = "disk";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string DisplayCountKey = "displaycount";
|
public const string DisplayCountKey = "displaycount";
|
||||||
|
|
||||||
/// <remarks>Display[]</remarks>
|
/// <remarks>Display[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DisplayKey = "display";
|
public const string DisplayKey = "display";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string DisplayTypeKey = "displaytype";
|
public const string DisplayTypeKey = "displaytype";
|
||||||
|
|
||||||
/// <remarks>Driver</remarks>
|
/// <remarks>Driver</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DriverKey = "driver";
|
public const string DriverKey = "driver";
|
||||||
|
|
||||||
/// <remarks>Dump[]</remarks>
|
/// <remarks>Dump[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DumpKey = "dump";
|
public const string DumpKey = "dump";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -95,6 +107,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string FavoriteKey = "favorite";
|
public const string FavoriteKey = "favorite";
|
||||||
|
|
||||||
/// <remarks>Feature[]</remarks>
|
/// <remarks>Feature[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string FeatureKey = "feature";
|
public const string FeatureKey = "feature";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -116,9 +129,11 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string ImageNumberKey = "imageNumber";
|
public const string ImageNumberKey = "imageNumber";
|
||||||
|
|
||||||
/// <remarks>Info[]</remarks>
|
/// <remarks>Info[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string InfoKey = "info";
|
public const string InfoKey = "info";
|
||||||
|
|
||||||
/// <remarks>Input</remarks>
|
/// <remarks>Input</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string InputKey = "input";
|
public const string InputKey = "input";
|
||||||
|
|
||||||
/// <remarks>(yes|no) "no"</remarks>
|
/// <remarks>(yes|no) "no"</remarks>
|
||||||
@@ -140,6 +155,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string ManufacturerKey = "manufacturer";
|
public const string ManufacturerKey = "manufacturer";
|
||||||
|
|
||||||
/// <remarks>Media[]</remarks>
|
/// <remarks>Media[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string MediaKey = "media";
|
public const string MediaKey = "media";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -149,6 +165,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string NotesKey = "notes";
|
public const string NotesKey = "notes";
|
||||||
|
|
||||||
/// <remarks>Part[]</remarks>
|
/// <remarks>Part[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string PartKey = "part";
|
public const string PartKey = "part";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -161,24 +178,28 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string PlayersKey = "players";
|
public const string PlayersKey = "players";
|
||||||
|
|
||||||
/// <remarks>Port[]</remarks>
|
/// <remarks>Port[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string PortKey = "port";
|
public const string PortKey = "port";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string PublisherKey = "publisher";
|
public const string PublisherKey = "publisher";
|
||||||
|
|
||||||
/// <remarks>RamOption[]</remarks>
|
/// <remarks>RamOption[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string RamOptionKey = "ramoption";
|
public const string RamOptionKey = "ramoption";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string RebuildToKey = "rebuildto";
|
public const string RebuildToKey = "rebuildto";
|
||||||
|
|
||||||
/// <remarks>Release[]</remarks>
|
/// <remarks>Release[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string ReleaseKey = "release";
|
public const string ReleaseKey = "release";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string ReleaseNumberKey = "releaseNumber";
|
public const string ReleaseNumberKey = "releaseNumber";
|
||||||
|
|
||||||
/// <remarks>Rom[]</remarks>
|
/// <remarks>Rom[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string RomKey = "rom";
|
public const string RomKey = "rom";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -191,6 +212,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string RunnableKey = "runnable";
|
public const string RunnableKey = "runnable";
|
||||||
|
|
||||||
/// <remarks>Sample[]</remarks>
|
/// <remarks>Sample[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SampleKey = "sample";
|
public const string SampleKey = "sample";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -200,15 +222,19 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string SaveTypeKey = "saveType";
|
public const string SaveTypeKey = "saveType";
|
||||||
|
|
||||||
/// <remarks>SharedFeat[]</remarks>
|
/// <remarks>SharedFeat[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SharedFeatKey = "sharedfeat";
|
public const string SharedFeatKey = "sharedfeat";
|
||||||
|
|
||||||
/// <remarks>Slot[]</remarks>
|
/// <remarks>Slot[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SlotKey = "slot";
|
public const string SlotKey = "slot";
|
||||||
|
|
||||||
/// <remarks>SoftwareList[]</remarks>
|
/// <remarks>SoftwareList[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SoftwareListKey = "softwarelist";
|
public const string SoftwareListKey = "softwarelist";
|
||||||
|
|
||||||
/// <remarks>Sound</remarks>
|
/// <remarks>Sound</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SoundKey = "sound";
|
public const string SoundKey = "sound";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -231,9 +257,11 @@ namespace SabreTools.Models.Internal
|
|||||||
|
|
||||||
/// TODO: This needs an internal model OR mapping to fields
|
/// TODO: This needs an internal model OR mapping to fields
|
||||||
/// <remarks>Trurip</remarks>
|
/// <remarks>Trurip</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string TruripKey = "trurip";
|
public const string TruripKey = "trurip";
|
||||||
|
|
||||||
/// <remarks>Video[]</remarks>
|
/// <remarks>Video[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string VideoKey = "video";
|
public const string VideoKey = "video";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Machine[]</remarks>
|
/// <remarks>Machine[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string MachineKey = "machine";
|
public const string MachineKey = "machine";
|
||||||
|
|
||||||
/// <remarks>Header</remarks>
|
/// <remarks>Header</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string HeaderKey = "header";
|
public const string HeaderKey = "header";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -9,15 +9,19 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>DataArea[]</remarks>
|
/// <remarks>DataArea[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DataAreaKey = "dataarea";
|
public const string DataAreaKey = "dataarea";
|
||||||
|
|
||||||
/// <remarks>DiskArea[]</remarks>
|
/// <remarks>DiskArea[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DiskAreaKey = "diskarea";
|
public const string DiskAreaKey = "diskarea";
|
||||||
|
|
||||||
/// <remarks>DipSwitch[]</remarks>
|
/// <remarks>DipSwitch[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string DipSwitchKey = "dipswitch";
|
public const string DipSwitchKey = "dipswitch";
|
||||||
|
|
||||||
/// <remarks>Feature[]</remarks>
|
/// <remarks>Feature[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string FeatureKey = "feature";
|
public const string FeatureKey = "feature";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace SabreTools.Models.Internal
|
|||||||
#region Keys
|
#region Keys
|
||||||
|
|
||||||
/// <remarks>Analog[]</remarks>
|
/// <remarks>Analog[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string AnalogKey = "analog";
|
public const string AnalogKey = "analog";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string NameKey = "name";
|
public const string NameKey = "name";
|
||||||
|
|
||||||
/// <remarks>SlotOption[]</remarks>
|
/// <remarks>SlotOption[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SlotOptionKey = "slotoption";
|
public const string SlotOptionKey = "slotoption";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string DescriptionKey = "description";
|
public const string DescriptionKey = "description";
|
||||||
|
|
||||||
/// <remarks>Info[]</remarks>
|
/// <remarks>Info[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string InfoKey = "info";
|
public const string InfoKey = "info";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
@@ -24,12 +25,14 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string NotesKey = "notes";
|
public const string NotesKey = "notes";
|
||||||
|
|
||||||
/// <remarks>Part[]</remarks>
|
/// <remarks>Part[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string PartKey = "part";
|
public const string PartKey = "part";
|
||||||
|
|
||||||
/// <remarks>string</remarks>
|
/// <remarks>string</remarks>
|
||||||
public const string PublisherKey = "publisher";
|
public const string PublisherKey = "publisher";
|
||||||
|
|
||||||
/// <remarks>SharedFeat[]</remarks>
|
/// <remarks>SharedFeat[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SharedFeatKey = "sharedfeat";
|
public const string SharedFeatKey = "sharedfeat";
|
||||||
|
|
||||||
/// <remarks>(yes|partial|no) "yes"</remarks>
|
/// <remarks>(yes|partial|no) "yes"</remarks>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace SabreTools.Models.Internal
|
|||||||
public const string NotesKey = "notes";
|
public const string NotesKey = "notes";
|
||||||
|
|
||||||
/// <remarks>Software[]</remarks>
|
/// <remarks>Software[]</remarks>
|
||||||
|
[NoFilter]
|
||||||
public const string SoftwareKey = "software";
|
public const string SoftwareKey = "software";
|
||||||
|
|
||||||
/// <remarks>(original|compatible)</remarks>
|
/// <remarks>(original|compatible)</remarks>
|
||||||
|
|||||||
8
SabreTools.Models/NoFilterAttribute.cs
Normal file
8
SabreTools.Models/NoFilterAttribute.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace SabreTools.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Marks a property as required on write
|
||||||
|
/// </summary>
|
||||||
|
[System.AttributeUsage(System.AttributeTargets.Field)]
|
||||||
|
public class NoFilterAttribute : System.Attribute { }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user