mirror of
https://github.com/SabreTools/SabreTools.RedumpLib.git
synced 2026-07-08 18:16:25 +00:00
Fully separate Legacy from current code
This commit is contained in:
47
SabreTools.RedumpLib.Legacy/Attributes/AttributeHelper.cs
Normal file
47
SabreTools.RedumpLib.Legacy/Attributes/AttributeHelper.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Attributes
|
||||
{
|
||||
public static class AttributeHelper<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the HumanReadableAttribute from a supported value
|
||||
/// </summary>
|
||||
/// <param name="value">Value to use</param>
|
||||
/// <returns>HumanReadableAttribute attached to the value</returns>
|
||||
public static HumanReadableAttribute? GetHumanReadableAttribute(T value)
|
||||
{
|
||||
// Null value in, null value out
|
||||
if (value is null)
|
||||
return null;
|
||||
|
||||
// Current enumeration type
|
||||
var enumType = typeof(T);
|
||||
if (Nullable.GetUnderlyingType(enumType) is not null)
|
||||
enumType = Nullable.GetUnderlyingType(enumType);
|
||||
|
||||
// If the value returns a null on ToString, just return null
|
||||
string? valueStr = value?.ToString();
|
||||
if (string.IsNullOrEmpty(valueStr))
|
||||
return null;
|
||||
|
||||
// Get the member info array
|
||||
var memberInfos = enumType?.GetMember(valueStr);
|
||||
if (memberInfos is null)
|
||||
return null;
|
||||
|
||||
// Get the enum value info from the array, if possible
|
||||
var enumValueMemberInfo = Array.Find(memberInfos, m => m.DeclaringType == enumType);
|
||||
if (enumValueMemberInfo is null)
|
||||
return null;
|
||||
|
||||
// Try to get the relevant attribute
|
||||
var attributes = enumValueMemberInfo.GetCustomAttributes(typeof(HumanReadableAttribute), true);
|
||||
if (attributes is null || attributes.Length == 0)
|
||||
return null;
|
||||
|
||||
// Return the first attribute, if possible
|
||||
return attributes[0] as HumanReadableAttribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Generic attribute for human readable values
|
||||
/// </summary>
|
||||
public class HumanReadableAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Item is marked as obsolete or unusable
|
||||
/// </summary>
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable name of the item
|
||||
/// </summary>
|
||||
public string? LongName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Internally used name of the item
|
||||
/// </summary>
|
||||
public string? ShortName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace SabreTools.RedumpLib.Legacy.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Attribute specifc to Language values
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Some languages have multiple proper names. Should all be supported?
|
||||
/// </remarks>
|
||||
public class LanguageCodeAttribute : HumanReadableAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// ISO 639-1 Code
|
||||
/// </summary>
|
||||
public string? TwoLetterCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ISO 639-2 Code (Standard or Bibliographic)
|
||||
/// </summary>
|
||||
public string? ThreeLetterCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ISO 639-2 Code (Terminology)
|
||||
/// </summary>
|
||||
public string? ThreeLetterCodeAlt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using SabreTools.RedumpLib.Attributes;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Attributes
|
||||
{
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize DiscCategory enum values
|
||||
/// </summary>
|
||||
public class DiscCategoryConverter : JsonConverter<DiscCategory?>
|
||||
{
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override DiscCategory? ReadJson(JsonReader reader, Type objectType, DiscCategory? existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
// If we have a value already, don't overwrite it
|
||||
if (hasExistingValue)
|
||||
return existingValue;
|
||||
|
||||
// Read the value
|
||||
if (reader.Value is not string value)
|
||||
return null;
|
||||
|
||||
// Try to parse the value
|
||||
return value.ToDiscCategory();
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, DiscCategory? value, JsonSerializer serializer)
|
||||
{
|
||||
JToken t = JToken.FromObject(value.LongName() ?? string.Empty);
|
||||
t.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
35
SabreTools.RedumpLib.Legacy/Converters/DiscTypeConverter.cs
Normal file
35
SabreTools.RedumpLib.Legacy/Converters/DiscTypeConverter.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize DiscType enum values
|
||||
/// </summary>
|
||||
public class DiscTypeConverter : JsonConverter<DiscType?>
|
||||
{
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override DiscType? ReadJson(JsonReader reader, Type objectType, DiscType? existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
// If we have a value already, don't overwrite it
|
||||
if (hasExistingValue)
|
||||
return existingValue;
|
||||
|
||||
// Read the value
|
||||
if (reader.Value is not string value)
|
||||
return null;
|
||||
|
||||
// Try to parse the value
|
||||
return value.ToDiscType();
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, DiscType? value, JsonSerializer serializer)
|
||||
{
|
||||
JToken t = JToken.FromObject(value.ShortName() ?? value.LongName() ?? string.Empty);
|
||||
t.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
55
SabreTools.RedumpLib.Legacy/Converters/LanguageConverter.cs
Normal file
55
SabreTools.RedumpLib.Legacy/Converters/LanguageConverter.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize Language enum values
|
||||
/// </summary>
|
||||
public class LanguageConverter : JsonConverter<Language?[]>
|
||||
{
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override Language?[] ReadJson(JsonReader reader, Type objectType, Language?[]? existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
// If we have a value already, don't overwrite it
|
||||
if (hasExistingValue)
|
||||
return existingValue ?? [];
|
||||
|
||||
// Get the current depth for checking
|
||||
int currentDepth = reader.Depth;
|
||||
|
||||
// Read the array while it exists
|
||||
List<Language> languages = [];
|
||||
while (reader.Read() && reader.Depth > currentDepth)
|
||||
{
|
||||
if (reader.Value is not string value)
|
||||
continue;
|
||||
|
||||
Language? lang = value.ToLanguage();
|
||||
if (lang is not null)
|
||||
languages.Add(lang.Value);
|
||||
}
|
||||
|
||||
return [.. languages];
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, Language?[]? value, JsonSerializer serializer)
|
||||
{
|
||||
if (value is null)
|
||||
return;
|
||||
|
||||
JArray array = [];
|
||||
foreach (var val in value)
|
||||
{
|
||||
JToken t = JToken.FromObject(val.ShortName() ?? string.Empty);
|
||||
array.Add(t);
|
||||
}
|
||||
|
||||
array.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
36
SabreTools.RedumpLib.Legacy/Converters/YesNoConverter.cs
Normal file
36
SabreTools.RedumpLib.Legacy/Converters/YesNoConverter.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize YesNo enum values
|
||||
/// </summary>
|
||||
public class YesNoConverter : JsonConverter<YesNo?>
|
||||
{
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override YesNo? ReadJson(JsonReader reader, Type objectType, YesNo? existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
// If we have a value already, don't overwrite it
|
||||
if (hasExistingValue)
|
||||
return existingValue;
|
||||
|
||||
// Read the value
|
||||
if (reader.Value is bool bVal)
|
||||
return bVal.ToYesNo();
|
||||
else if (reader.Value is string sVal)
|
||||
return sVal.ToYesNo();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, YesNo? value, JsonSerializer serializer)
|
||||
{
|
||||
JToken t = JToken.FromObject(value.LongName() ?? string.Empty);
|
||||
t.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,46 @@
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Attributes;
|
||||
using HumanReadableAttribute = SabreTools.RedumpLib.Attributes.HumanReadableAttribute;
|
||||
using LanguageCodeAttribute = SabreTools.RedumpLib.Attributes.LanguageCodeAttribute;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// List of all disc categories
|
||||
/// </summary>
|
||||
public enum DiscCategory
|
||||
{
|
||||
[HumanReadable(LongName = "Games")]
|
||||
Games = 1,
|
||||
|
||||
[HumanReadable(LongName = "Demos")]
|
||||
Demos = 2,
|
||||
|
||||
[HumanReadable(LongName = "Video")]
|
||||
Video = 3,
|
||||
|
||||
[HumanReadable(LongName = "Audio")]
|
||||
Audio = 4,
|
||||
|
||||
[HumanReadable(LongName = "Multimedia")]
|
||||
Multimedia = 5,
|
||||
|
||||
[HumanReadable(LongName = "Applications")]
|
||||
Applications = 6,
|
||||
|
||||
[HumanReadable(LongName = "Coverdiscs")]
|
||||
Coverdiscs = 7,
|
||||
|
||||
[HumanReadable(LongName = "Educational")]
|
||||
Educational = 8,
|
||||
|
||||
[HumanReadable(LongName = "Bonus Discs")]
|
||||
BonusDiscs = 9,
|
||||
|
||||
[HumanReadable(LongName = "Preproduction")]
|
||||
Preproduction = 10,
|
||||
|
||||
[HumanReadable(LongName = "Add-Ons")]
|
||||
AddOns = 11,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all disc subpaths
|
||||
/// </summary>
|
||||
@@ -45,6 +81,95 @@ namespace SabreTools.RedumpLib.Legacy.Data
|
||||
WIP,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all site-supported disc types
|
||||
/// </summary>
|
||||
public enum DiscType
|
||||
{
|
||||
NONE = 0,
|
||||
|
||||
[HumanReadable(LongName = "BD-25", ShortName = "bd25")]
|
||||
BD25,
|
||||
|
||||
/// <remarks>Not official</remarks>
|
||||
[HumanReadable(LongName = "BD-33", ShortName = "bd33")]
|
||||
BD33,
|
||||
|
||||
[HumanReadable(LongName = "BD-50", ShortName = "bd50")]
|
||||
BD50,
|
||||
|
||||
[HumanReadable(LongName = "BD-66", ShortName = "bd66")]
|
||||
BD66,
|
||||
|
||||
[HumanReadable(LongName = "BD-100", ShortName = "bd100")]
|
||||
BD100,
|
||||
|
||||
/// <remarks>Not official</remarks>
|
||||
[HumanReadable(LongName = "BD-128", ShortName = "bd128")]
|
||||
BD128,
|
||||
|
||||
[HumanReadable(LongName = "CD", ShortName = "cd")]
|
||||
CD,
|
||||
|
||||
[HumanReadable(LongName = "DVD-5", ShortName = "dvd5")]
|
||||
DVD5,
|
||||
|
||||
[HumanReadable(LongName = "DVD-9", ShortName = "dvd9")]
|
||||
DVD9,
|
||||
|
||||
[HumanReadable(LongName = "GD-ROM", ShortName = "gdrom")]
|
||||
GDROM,
|
||||
|
||||
[HumanReadable(LongName = "HD-DVD (SL)", ShortName = "hdvd15")]
|
||||
HDDVDSL,
|
||||
|
||||
[HumanReadable(LongName = "HD-DVD (DL)", ShortName = "hdvd30")]
|
||||
HDDVDDL,
|
||||
|
||||
/// <remarks>Not official</remarks>
|
||||
[HumanReadable(LongName = "MIL-CD", ShortName = "milcd")]
|
||||
MILCD,
|
||||
|
||||
[HumanReadable(LongName = "Nintendo GameCube Game Disc", ShortName = "dvd5gc")]
|
||||
NintendoGameCubeGameDisc,
|
||||
|
||||
[HumanReadable(LongName = "Nintendo Wii Optical Disc (SL)", ShortName = "dvd5wii")]
|
||||
NintendoWiiOpticalDiscSL,
|
||||
|
||||
[HumanReadable(LongName = "Nintendo Wii Optical Disc (DL)", ShortName = "dvd9wii")]
|
||||
NintendoWiiOpticalDiscDL,
|
||||
|
||||
[HumanReadable(LongName = "Nintendo Wii U Optical Disc (SL)", ShortName = "bd25wiiu")]
|
||||
NintendoWiiUOpticalDiscSL,
|
||||
|
||||
[HumanReadable(LongName = "UMD (SL)", ShortName = "umd1")]
|
||||
UMDSL,
|
||||
|
||||
[HumanReadable(LongName = "UMD (DL)", ShortName = "umd2")]
|
||||
UMDDL,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dump status
|
||||
/// </summary>
|
||||
public enum DumpStatus
|
||||
{
|
||||
[HumanReadable(LongName = "Unknown", ShortName = "grey")]
|
||||
UnknownGrey = 1,
|
||||
|
||||
[HumanReadable(LongName = "Disabled", ShortName = "red")]
|
||||
DisabledRed = 2,
|
||||
|
||||
[HumanReadable(LongName = "Possible Bad Dump", ShortName = "yellow")]
|
||||
PossibleBadDumpYellow = 3,
|
||||
|
||||
[HumanReadable(LongName = "Original Media", ShortName = "blue")]
|
||||
OriginalMediaBlue = 4,
|
||||
|
||||
[HumanReadable(LongName = "Two or More", ShortName = "green")]
|
||||
TwoOrMoreGreen = 5,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all disc langauges
|
||||
/// </summary>
|
||||
@@ -238,6 +363,46 @@ namespace SabreTools.RedumpLib.Legacy.Data
|
||||
Sbis,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all media types defined in Redump.org
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This represents media type categories which are then further refined
|
||||
/// into specific disc types. e.g. DVD instead of DVD-5 and DVD-9
|
||||
/// </remarks>
|
||||
public enum PhysicalMediaType
|
||||
{
|
||||
[HumanReadable(Available = false, LongName = "Unknown", ShortName = "unknown")]
|
||||
NONE = 0,
|
||||
|
||||
[HumanReadable(LongName = "BD-ROM", ShortName = "bdrom")]
|
||||
BluRay,
|
||||
|
||||
[HumanReadable(LongName = "CD-ROM", ShortName = "cdrom")]
|
||||
CDROM,
|
||||
|
||||
[HumanReadable(LongName = "DVD-ROM", ShortName = "dvd")]
|
||||
DVD,
|
||||
|
||||
[HumanReadable(LongName = "GD-ROM", ShortName = "gdrom")]
|
||||
GDROM,
|
||||
|
||||
[HumanReadable(LongName = "HD-DVD-ROM", ShortName = "hddvd")]
|
||||
HDDVD,
|
||||
|
||||
[HumanReadable(LongName = "GameCube Game Disc", ShortName = "gc")]
|
||||
NintendoGameCubeGameDisc,
|
||||
|
||||
[HumanReadable(LongName = "Wii Optical Disc", ShortName = "wii")]
|
||||
NintendoWiiOpticalDisc,
|
||||
|
||||
[HumanReadable(LongName = "Wii U Optical Disc", ShortName = "wiiu")]
|
||||
NintendoWiiUOpticalDisc,
|
||||
|
||||
[HumanReadable(LongName = "UMD", ShortName = "umd")]
|
||||
UMD,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all systems defined in Redump.org
|
||||
/// </summary>
|
||||
@@ -438,7 +603,7 @@ namespace SabreTools.RedumpLib.Legacy.Data
|
||||
NamcoSystem12,
|
||||
|
||||
[System(Category = SystemCategory.Arcade, LongName = "Namco System 246 / System 256", ShortName = "ns246", HasCues = true, HasDat = true)]
|
||||
NamcoSystem246,
|
||||
NamcoSystem246256,
|
||||
|
||||
[System(Category = SystemCategory.Arcade, LongName = "Panasonic M2", ShortName = "m2", IsBanned = true, HasCues = true, HasDat = true)]
|
||||
PanasonicM2,
|
||||
@@ -767,4 +932,383 @@ namespace SabreTools.RedumpLib.Legacy.Data
|
||||
[HumanReadable(LongName = "World", ShortName = "W")]
|
||||
World,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all Redump site codes
|
||||
/// </summary>
|
||||
public enum SiteCode
|
||||
{
|
||||
[HumanReadable(ShortName = "[T:ACC]", LongName = "<b>Acclaim ID</b>:")]
|
||||
AcclaimID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Accolade ID</b>:", LongName = "<b>Accolade ID</b>:")]
|
||||
AccoladeID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ACT]", LongName = "<b>Activision ID</b>:")]
|
||||
ActivisionID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Additional BCA Data</b>:", LongName = "<b>Additional BCA Data</b>:")]
|
||||
AdditionalBCAData,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ALT]", LongName = "<b>Alternative Title</b>:")]
|
||||
AlternativeTitle,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ALTF]", LongName = "<b>Alternative Foreign Title</b>:")]
|
||||
AlternativeForeignTitle,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Applications</b>:", LongName = "<b>Applications</b>:")]
|
||||
Applications,
|
||||
|
||||
[HumanReadable(ShortName = "[T:BID]", LongName = "<b>Bandai ID</b>:")]
|
||||
BandaiID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:BBFC]", LongName = "<b>BBFC Reg. No.</b>:")]
|
||||
BBFCRegistrationNumber,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Bethesda ID</b>:", LongName = "<b>Bethesda ID</b>:")]
|
||||
BethesdaID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>CD Projekt ID</b>:", LongName = "<b>CD Projekt ID</b>:")]
|
||||
CDProjektID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Compatible OS</b>:", LongName = "<b>Compatible OS</b>:")]
|
||||
CompatibleOS,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Cover ID</b>:", LongName = "<b>Cover ID</b>:")]
|
||||
CoverID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Disc Hologram ID</b>:", LongName = "<b>Disc Hologram ID</b>:")]
|
||||
DiscHologramID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Disc ID</b>:", LongName = "<b>Disc ID</b>:")]
|
||||
DiscID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Disc Title (non-Latin)</b>:", LongName = "<b>Disc Title (non-Latin)</b>:")]
|
||||
DiscTitleNonLatin,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Disney Interactive ID</b>", LongName = "<b>Disney Interactive ID</b>:")]
|
||||
DisneyInteractiveID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>DMI</b>:", LongName = "<b>DMI</b>:")]
|
||||
DMIHash,
|
||||
|
||||
[HumanReadable(ShortName = "[T:DNAS]", LongName = "<b>DNAS Disc ID</b>:")]
|
||||
DNASDiscID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Edition (non-Latin)</b>:", LongName = "<b>Edition (non-Latin)</b>:")]
|
||||
EditionNonLatin,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Eidos ID</b>:", LongName = "<b>Eidos ID</b>:")]
|
||||
EidosID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:EAID]", LongName = "<b>Electronic Arts ID</b>:")]
|
||||
ElectronicArtsID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:X]", LongName = "<b>Extras</b>:")]
|
||||
Extras,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Filename</b>:", LongName = "<b>Filename</b>:")]
|
||||
Filename,
|
||||
|
||||
[HumanReadable(ShortName = "[T:FIID]", LongName = "<b>Fox Interactive ID</b>:")]
|
||||
FoxInteractiveID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:GF]", LongName = "<b>Game Footage</b>:")]
|
||||
GameFootage,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Games</b>:", LongName = "<b>Games</b>:")]
|
||||
Games,
|
||||
|
||||
[HumanReadable(ShortName = "[T:G]", LongName = "<b>Genre</b>:")]
|
||||
Genre,
|
||||
|
||||
[HumanReadable(ShortName = "[T:GTID]", LongName = "<b>GT Interactive ID</b>:")]
|
||||
GTInteractiveID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>High Sierra Volume Descriptor</b>:", LongName = "<b>High Sierra Volume Descriptor</b>:")]
|
||||
HighSierraVolumeDescriptor,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Internal Name</b>:", LongName = "<b>Internal Name</b>:")]
|
||||
InternalName,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ISN]", LongName = "<b>Internal Serial</b>:")]
|
||||
InternalSerialName,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Interplay ID</b>:", LongName = "<b>Interplay ID</b>:")]
|
||||
InterplayID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ISBN]", LongName = "<b>ISBN</b>:")]
|
||||
ISBN,
|
||||
|
||||
[HumanReadable(ShortName = "[T:ISSN]", LongName = "<b>ISSN</b>:")]
|
||||
ISSN,
|
||||
|
||||
[HumanReadable(ShortName = "[T:JID]", LongName = "<b>JASRAC ID</b>:")]
|
||||
JASRACID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:KIRZ]", LongName = "<b>King Records ID</b>:")]
|
||||
KingRecordsID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:KOEI]", LongName = "<b>Koei ID</b>:")]
|
||||
KoeiID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:KID]", LongName = "<b>Konami ID</b>:")]
|
||||
KonamiID,
|
||||
|
||||
// This doesn't have a site tag yet, promoted to field in redump.info
|
||||
[HumanReadable(ShortName = "<b>Logs Link</b>:", LongName = "<b>Logs Link</b>:")]
|
||||
LogsLink,
|
||||
|
||||
[HumanReadable(ShortName = "[T:LAID]", LongName = "<b>Lucas Arts ID</b>:")]
|
||||
LucasArtsID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Microsoft ID</b>:", LongName = "<b>Microsoft ID</b>:")]
|
||||
MicrosoftID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Multisession</b>:", LongName = "<b>Multisession</b>:")]
|
||||
Multisession,
|
||||
|
||||
[HumanReadable(ShortName = "[T:NGID]", LongName = "<b>Nagano ID</b>:")]
|
||||
NaganoID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:NID]", LongName = "<b>Namco ID</b>:")]
|
||||
NamcoID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:NYG]", LongName = "<b>Net Yaroze Games</b>:")]
|
||||
NetYarozeGames,
|
||||
|
||||
[HumanReadable(ShortName = "[T:NPS]", LongName = "<b>Nippon Ichi Software ID</b>:")]
|
||||
NipponIchiSoftwareID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:OID]", LongName = "<b>Origin ID</b>:")]
|
||||
OriginID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:P]", LongName = "<b>Patches</b>:")]
|
||||
Patches,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
/// <remarks>No text value after</remarks>
|
||||
[HumanReadable(ShortName = "PC/Mac Hybrid", LongName = "PC/Mac Hybrid")]
|
||||
PCMacHybrid,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>PFI</b>:", LongName = "<b>PFI</b>:")]
|
||||
PFIHash,
|
||||
|
||||
[HumanReadable(ShortName = "[T:PD]", LongName = "<b>Playable Demos</b>:")]
|
||||
PlayableDemos,
|
||||
|
||||
[HumanReadable(ShortName = "[T:PCID]", LongName = "<b>Pony Canyon ID</b>:")]
|
||||
PonyCanyonID,
|
||||
|
||||
/// <remarks>No text value after</remarks>
|
||||
[HumanReadable(ShortName = "[T:PT2]", LongName = "<b>Postgap type</b>: Form 2")]
|
||||
PostgapType,
|
||||
|
||||
[HumanReadable(ShortName = "[T:PPN]", LongName = "<b>PPN</b>:")]
|
||||
PPN,
|
||||
|
||||
// This doesn't have a site tag for some systems yet
|
||||
[HumanReadable(ShortName = "<b>Protection</b>:", LongName = "<b>Protection</b>:")]
|
||||
Protection,
|
||||
|
||||
// This doesn't have a site tag yet, promoted to field in redump.info
|
||||
[HumanReadable(ShortName = "<b>Ring non-zero data start</b>:", LongName = "<b>Ring non-zero data start</b>:")]
|
||||
RingNonZeroDataStart,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Ring Perfect Audio Offset</b>:", LongName = "<b>Ring Perfect Audio Offset</b>:")]
|
||||
RingPerfectAudioOffset,
|
||||
|
||||
[HumanReadable(ShortName = "[T:RD]", LongName = "<b>Rolling Demos</b>:")]
|
||||
RollingDemos,
|
||||
|
||||
[HumanReadable(ShortName = "[T:SG]", LongName = "<b>Savegames</b>:")]
|
||||
Savegames,
|
||||
|
||||
[HumanReadable(ShortName = "[T:SID]", LongName = "<b>Sega ID</b>:")]
|
||||
SegaID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:SNID]", LongName = "<b>Selen ID</b>:")]
|
||||
SelenID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:S]", LongName = "<b>Series</b>:")]
|
||||
Series,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Sierra ID</b>:", LongName = "<b>Sierra ID</b>:")]
|
||||
SierraID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>SS</b>:", LongName = "<b>SS</b>:")]
|
||||
SSHash,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>SS version</b>:", LongName = "<b>SS version</b>:")]
|
||||
SSVersion,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Steam App ID</b>:", LongName = "<b>Steam AppID</b>:")]
|
||||
SteamAppID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Steam Depot ID (.sis/.csm/.csd)</b>:", LongName = "<b>Steam Depot ID (.sis/.csm/.csd)</b>:")]
|
||||
SteamCsmCsdDepotID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Steam Depot ID (.sis/.sim/.sid)</b>:", LongName = "<b>Steam Depot ID (.sis/.sim/.sid)</b>:")]
|
||||
SteamSimSidDepotID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:TID]", LongName = "<b>Taito ID</b>:")]
|
||||
TaitoID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:TD]", LongName = "<b>Tech Demos</b>:")]
|
||||
TechDemos,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Title ID</b>:", LongName = "<b>Title ID</b>:")]
|
||||
TitleID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>2K Games ID</b>:", LongName = "<b>2K Games ID</b>:")]
|
||||
TwoKGamesID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:UID]", LongName = "<b>Ubisoft ID</b>:")]
|
||||
UbisoftID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Universal Hash (SHA-1)</b>:", LongName = "<b>Universal Hash (SHA-1)</b>:")]
|
||||
UniversalHash,
|
||||
|
||||
[HumanReadable(ShortName = "[T:VID]", LongName = "<b>Valve ID</b>:")]
|
||||
ValveID,
|
||||
|
||||
[HumanReadable(ShortName = "[T:VFC]", LongName = "<b>VFC code</b>:")]
|
||||
VFCCode,
|
||||
|
||||
[HumanReadable(ShortName = "[T:V]", LongName = "<b>Videos</b>:")]
|
||||
Videos,
|
||||
|
||||
[HumanReadable(ShortName = "[T:VOL]", LongName = "<b>Volume Label</b>:")]
|
||||
VolumeLabel,
|
||||
|
||||
/// <remarks>No text value after</remarks>
|
||||
[HumanReadable(ShortName = "[T:VCD]", LongName = "<b>V-CD</b>")]
|
||||
VCD,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>XeMID</b>:", LongName = "<b>XeMID</b>:")]
|
||||
XeMID,
|
||||
|
||||
// This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>XMID</b>:", LongName = "<b>XMID</b>:")]
|
||||
XMID,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all recognized sort parameters
|
||||
/// </summary>
|
||||
public enum SortCategory
|
||||
{
|
||||
[HumanReadable(LongName = "Title", ShortName = "title")]
|
||||
Title,
|
||||
|
||||
[HumanReadable(LongName = "Added", ShortName = "added")]
|
||||
Added,
|
||||
|
||||
[HumanReadable(LongName = "Region", ShortName = "region")]
|
||||
Region,
|
||||
|
||||
[HumanReadable(LongName = "System", ShortName = "system")]
|
||||
System,
|
||||
|
||||
[HumanReadable(LongName = "Version", ShortName = "version")]
|
||||
Version,
|
||||
|
||||
[HumanReadable(LongName = "Edition", ShortName = "edition")]
|
||||
Edition,
|
||||
|
||||
[HumanReadable(LongName = "Languages", ShortName = "languages")]
|
||||
Languages,
|
||||
|
||||
[HumanReadable(LongName = "Serial", ShortName = "serial")]
|
||||
Serial,
|
||||
|
||||
[HumanReadable(LongName = "Status", ShortName = "status")]
|
||||
Status,
|
||||
|
||||
[HumanReadable(LongName = "Modified", ShortName = "modified")]
|
||||
Modified,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all recognized sort directions
|
||||
/// </summary>
|
||||
public enum SortDirection
|
||||
{
|
||||
[HumanReadable(LongName = "Ascending", ShortName = "asc")]
|
||||
Ascending,
|
||||
|
||||
[HumanReadable(LongName = "Descending", ShortName = "desc")]
|
||||
Descending,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of system categories
|
||||
/// </summary>
|
||||
public enum SystemCategory
|
||||
{
|
||||
NONE = 0,
|
||||
|
||||
[HumanReadable(LongName = "Disc-Based Consoles")]
|
||||
DiscBasedConsole,
|
||||
|
||||
[HumanReadable(LongName = "Other Consoles")]
|
||||
OtherConsole,
|
||||
|
||||
[HumanReadable(LongName = "Computers")]
|
||||
Computer,
|
||||
|
||||
[HumanReadable(LongName = "Arcade")]
|
||||
Arcade,
|
||||
|
||||
[HumanReadable(LongName = "Other")]
|
||||
Other,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Generic yes/no values
|
||||
/// </summary>
|
||||
public enum YesNo
|
||||
{
|
||||
[HumanReadable(LongName = "Yes/No")]
|
||||
NULL = 0,
|
||||
|
||||
[HumanReadable(LongName = "No")]
|
||||
No = 1,
|
||||
|
||||
[HumanReadable(LongName = "Yes")]
|
||||
Yes = 2,
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.RedumpLib.Converters;
|
||||
using DiscCategory = SabreTools.RedumpLib.Data.DiscCategory;
|
||||
using MediaType = SabreTools.RedumpLib.Data.MediaType;
|
||||
using SiteCode = SabreTools.RedumpLib.Data.SiteCode;
|
||||
using SabreTools.RedumpLib.Legacy.Converters;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
{
|
||||
@@ -15,13 +12,13 @@ namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
{
|
||||
// Name not defined by Redump
|
||||
[JsonProperty(PropertyName = "d_system", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
[JsonConverter(typeof(Converters.PhysicalSystemConverter))]
|
||||
[JsonConverter(typeof(PhysicalSystemConverter))]
|
||||
public PhysicalSystem? System { get; set; }
|
||||
|
||||
// Name not defined by Redump
|
||||
[JsonProperty(PropertyName = "d_media", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
[JsonConverter(typeof(MediaTypeConverter))]
|
||||
public MediaType? Media { get; set; }
|
||||
[JsonConverter(typeof(DiscTypeConverter))]
|
||||
public DiscType? Media { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "d_title", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
public string? Title { get; set; }
|
||||
@@ -40,7 +37,7 @@ namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
public DiscCategory? Category { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "d_region", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
[JsonConverter(typeof(Converters.RegionConverter))]
|
||||
[JsonConverter(typeof(RegionConverter))]
|
||||
public Region? Region { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "d_languages", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
@@ -48,7 +45,7 @@ namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
public Language?[]? Languages { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "d_languages_selection", NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(Converters.LanguageSelectionConverter))]
|
||||
[JsonConverter(typeof(LanguageSelectionConverter))]
|
||||
public LanguageSelection?[]? LanguageSelection { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "d_serial", NullValueHandling = NullValueHandling.Ignore)]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.RedumpLib.Converters;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Converters;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.RedumpLib.Converters;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Converters;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Data.Sections
|
||||
{
|
||||
|
||||
114
SabreTools.RedumpLib.Legacy/Data/Template.cs
Normal file
114
SabreTools.RedumpLib.Legacy/Data/Template.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
namespace SabreTools.RedumpLib.Legacy.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Template field values for submission info
|
||||
/// </summary>
|
||||
internal static class Template
|
||||
{
|
||||
#region Common Disc Info
|
||||
|
||||
public const string TitleField = "Title";
|
||||
public const string ForeignTitleNonLatinField = "Foreign Title (Non-Latin)";
|
||||
public const string DiscNumberLetterField = "Disc Number/Letter";
|
||||
public const string DiscTitleField = "Disc Title";
|
||||
public const string SystemField = "System";
|
||||
public const string MediaTypeField = "Media Type";
|
||||
public const string CategoryField = "Category";
|
||||
public const string FullyMatchingIDField = "Fully Matching ID";
|
||||
public const string PartiallyMatchingIDsField = "Partially Matching IDs";
|
||||
public const string RegionField = "Region";
|
||||
public const string LanguagesField = "Languages";
|
||||
public const string PlaystationLanguageSelectionViaField = "Language Selection Via";
|
||||
public const string SerialField = "Serial";
|
||||
|
||||
#region Ringcode Information
|
||||
|
||||
public const string MasteringRingField = "Mastering Ring";
|
||||
public const string MasteringSIDField = "Mastering SID";
|
||||
public const string ToolstampMasteringCodeField = "Toolstamp/Mastering Code";
|
||||
public const string MouldSIDField = "Mould SID";
|
||||
public const string AdditionalMouldField = "Additional Mould";
|
||||
public const string WriteOffsetField = "Write Offset";
|
||||
|
||||
#endregion
|
||||
|
||||
public const string BarcodeField = "Barcode";
|
||||
public const string EXEDateBuildDate = "EXE/Build Date";
|
||||
public const string ErrorsCountField = "Errors Count";
|
||||
public const string CommentsField = "Comments";
|
||||
public const string ContentsField = "Contents";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Version and Editions
|
||||
|
||||
public const string VersionField = "Version";
|
||||
public const string EditionsField = "Editions";
|
||||
|
||||
#endregion
|
||||
|
||||
#region EDC
|
||||
|
||||
public const string EDCField = "EDC";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extras
|
||||
|
||||
public const string PVDField = "Primary Volume Descriptor (PVD)";
|
||||
public const string DiscKeyField = "Disc Key";
|
||||
public const string DiscIDField = "Disc ID";
|
||||
public const string PICField = "Permanent Information & Control (PIC)";
|
||||
public const string HeaderField = "Header";
|
||||
public const string BCAField = "Burst Cutting Area (BCA)";
|
||||
public const string SecuritySectorRangesField = "Security Sector Ranges";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Copy Protection
|
||||
|
||||
public const string PlayStationAntiModchipField = "Anti-modchip";
|
||||
public const string PlayStationLibCryptField = "LibCrypt";
|
||||
public const string LibCryptDataField = "LibCrypt Data";
|
||||
public const string ProtectionField = "Protection";
|
||||
public const string SecuROMDataField = "SecuROM Data";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tracks and Write Offsets
|
||||
|
||||
public const string ClrMameProDataField = "ClrMamePro Data (DAT)";
|
||||
public const string CuesheetField = "Cuesheet";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Size and Checksums
|
||||
|
||||
public const string LayerbreakField = "Layerbreak";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dumping Info
|
||||
|
||||
public const string FrontendVersionField = "Frontend Version";
|
||||
public const string DumpingProgramField = "Dumping Program";
|
||||
public const string DumpingDateField = "Date";
|
||||
public const string DumpingParametersField = "Parameters";
|
||||
public const string DumpingDriveManufacturer = "Manufacturer";
|
||||
public const string DumpingDriveModel = "Model";
|
||||
public const string DumpingDriveFirmware = "Firmware";
|
||||
public const string ReportedDiscType = "Reported Disc Type";
|
||||
public const string C2ErrorCount = "C2 Error Count";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Default values
|
||||
|
||||
public const string RequiredValue = "(REQUIRED)";
|
||||
public const string RequiredIfExistsValue = "(REQUIRED, IF EXISTS)";
|
||||
public const string OptionalValue = "(OPTIONAL)";
|
||||
public const string DiscNotDetected = "Disc Not Detected";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
9
SabreTools.RedumpLib.Legacy/ExtensionAttribute.cs
Normal file
9
SabreTools.RedumpLib.Legacy/ExtensionAttribute.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
#if NET20
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
|
||||
internal sealed class ExtensionAttribute : Attribute {}
|
||||
}
|
||||
|
||||
#endif
|
||||
474
SabreTools.RedumpLib.Legacy/OldDotNet.cs
Normal file
474
SabreTools.RedumpLib.Legacy/OldDotNet.cs
Normal file
@@ -0,0 +1,474 @@
|
||||
#if NET20 || NET35
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy
|
||||
{
|
||||
/// <see href="https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Net/WebUtility.cs"/>
|
||||
internal static class WebUtility
|
||||
{
|
||||
// some consts copied from Char / CharUnicodeInfo since we don't have friend access to those types
|
||||
private const char HIGH_SURROGATE_START = '\uD800';
|
||||
private const char LOW_SURROGATE_START = '\uDC00';
|
||||
private const char LOW_SURROGATE_END = '\uDFFF';
|
||||
private const int UNICODE_PLANE00_END = 0x00FFFF;
|
||||
private const int UNICODE_PLANE01_START = 0x10000;
|
||||
private const int UNICODE_PLANE16_END = 0x10FFFF;
|
||||
|
||||
public static string? HtmlDecode(string? value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
char[] valueSpan = value!.ToCharArray();
|
||||
|
||||
int index = Array.IndexOf(valueSpan, '&');
|
||||
if (index < 0)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
// In the worst case the decoded string has the same length.
|
||||
// For small inputs we use stack allocation.
|
||||
StringBuilder sb = value.Length <= 256 ?
|
||||
new StringBuilder(256) :
|
||||
new StringBuilder(value.Length);
|
||||
|
||||
char[] take = new char[index];
|
||||
Array.Copy(valueSpan, take, index);
|
||||
sb.Append(take);
|
||||
|
||||
char[] skip = new char[valueSpan.Length - index];
|
||||
Array.Copy(valueSpan, index, skip, 0, skip.Length);
|
||||
HtmlDecode(skip, ref sb);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static void HtmlDecode(char[] input, ref StringBuilder output)
|
||||
{
|
||||
for (int i = 0; i < input.Length; i++)
|
||||
{
|
||||
char ch = input[i];
|
||||
|
||||
if (ch == '&')
|
||||
{
|
||||
// We found a '&'. Now look for the next ';' or '&'. The idea is that
|
||||
// if we find another '&' before finding a ';', then this is not an entity,
|
||||
// and the next '&' might start a real entity (VSWhidbey 275184)
|
||||
char[] inputSlice = new char[input.Length - (i + 1)];
|
||||
Array.Copy(input, i + 1, inputSlice, 0, inputSlice.Length);
|
||||
|
||||
int semicolonPos = Array.IndexOf(inputSlice, ';');
|
||||
int ampersandPos = Array.IndexOf(inputSlice, '&');
|
||||
int entityLength;
|
||||
if (semicolonPos > -1 && ampersandPos > -1)
|
||||
entityLength = Math.Min(semicolonPos, ampersandPos);
|
||||
else if (semicolonPos <= -1 && ampersandPos > -1)
|
||||
entityLength = ampersandPos;
|
||||
else if (semicolonPos > -1 && ampersandPos <= -1)
|
||||
entityLength = semicolonPos;
|
||||
else
|
||||
entityLength = -1;
|
||||
|
||||
if (entityLength >= 0 && inputSlice[entityLength] == ';')
|
||||
{
|
||||
int entityEndPosition = (i + 1) + entityLength;
|
||||
if (entityLength > 1 && inputSlice[0] == '#')
|
||||
{
|
||||
// The # syntax can be in decimal or hex, e.g.
|
||||
// å --> decimal
|
||||
// å --> same char in hex
|
||||
// See http://www.w3.org/TR/REC-html40/charset.html#entities
|
||||
|
||||
int offset = inputSlice[1] == 'x' || inputSlice[1] == 'X' ? 2 : 1;
|
||||
char[] inputSliceNoPrefix = new char[entityLength - offset];
|
||||
Array.Copy(inputSlice, offset, inputSliceNoPrefix, 0, inputSliceNoPrefix.Length);
|
||||
|
||||
bool parsedSuccessfully = inputSlice[1] == 'x' || inputSlice[1] == 'X'
|
||||
? uint.TryParse(new string(inputSliceNoPrefix), NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out uint parsedValue)
|
||||
: uint.TryParse(new string(inputSliceNoPrefix), NumberStyles.Integer, CultureInfo.InvariantCulture, out parsedValue);
|
||||
|
||||
if (parsedSuccessfully)
|
||||
{
|
||||
// decoded character must be U+0000 .. U+10FFFF, excluding surrogates
|
||||
parsedSuccessfully = ((parsedValue < HIGH_SURROGATE_START) || (LOW_SURROGATE_END < parsedValue && parsedValue <= UNICODE_PLANE16_END));
|
||||
}
|
||||
|
||||
if (parsedSuccessfully)
|
||||
{
|
||||
if (parsedValue <= UNICODE_PLANE00_END)
|
||||
{
|
||||
// single character
|
||||
output.Append((char)parsedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
// multi-character
|
||||
ConvertSmpToUtf16(parsedValue, out char leadingSurrogate, out char trailingSurrogate);
|
||||
output.Append(leadingSurrogate);
|
||||
output.Append(trailingSurrogate);
|
||||
}
|
||||
|
||||
i = entityEndPosition; // already looked at everything until semicolon
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char[] entity = new char[entityLength];
|
||||
Array.Copy(inputSlice, entity, entityLength);
|
||||
i = entityEndPosition; // already looked at everything until semicolon
|
||||
char entityChar = HtmlEntities.Lookup(entity);
|
||||
|
||||
if (entityChar != (char)0)
|
||||
{
|
||||
ch = entityChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
output.Append('&');
|
||||
output.Append(entity);
|
||||
output.Append(';');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output.Append(ch);
|
||||
}
|
||||
}
|
||||
|
||||
// similar to Char.ConvertFromUtf32, but doesn't check arguments or generate strings
|
||||
// input is assumed to be an SMP character
|
||||
private static void ConvertSmpToUtf16(uint smpChar, out char leadingSurrogate, out char trailingSurrogate)
|
||||
{
|
||||
int utf32 = (int)(smpChar - UNICODE_PLANE01_START);
|
||||
leadingSurrogate = (char)((utf32 / 0x400) + HIGH_SURROGATE_START);
|
||||
trailingSurrogate = (char)((utf32 % 0x400) + LOW_SURROGATE_START);
|
||||
}
|
||||
|
||||
// helper class for lookup of HTML encoding entities
|
||||
private static class HtmlEntities
|
||||
{
|
||||
// The list is from http://www.w3.org/TR/REC-html40/sgml/entities.html, except for ', which
|
||||
// is defined in http://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent.
|
||||
private static Dictionary<ulong, char> InitializeLookupTable()
|
||||
{
|
||||
byte[] tableData =
|
||||
[
|
||||
0x74, 0x6F, 0x75, 0x71, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("quot")*/ 0x22, 0x00, /*'\x0022'*/
|
||||
0x70, 0x6D, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("amp")*/ 0x26, 0x00, /*'\x0026'*/
|
||||
0x73, 0x6F, 0x70, 0x61, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("apos")*/ 0x27, 0x00, /*'\x0027'*/
|
||||
0x74, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("lt")*/ 0x3C, 0x00, /*'\x003c'*/
|
||||
0x74, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("gt")*/ 0x3E, 0x00, /*'\x003e'*/
|
||||
0x70, 0x73, 0x62, 0x6E, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("nbsp")*/ 0xA0, 0x00, /*'\x00a0'*/
|
||||
0x6C, 0x63, 0x78, 0x65, 0x69, 0x00, 0x00, 0x00, /*ToUInt64Key("iexcl")*/ 0xA1, 0x00, /*'\x00a1'*/
|
||||
0x74, 0x6E, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("cent")*/ 0xA2, 0x00, /*'\x00a2'*/
|
||||
0x64, 0x6E, 0x75, 0x6F, 0x70, 0x00, 0x00, 0x00, /*ToUInt64Key("pound")*/ 0xA3, 0x00, /*'\x00a3'*/
|
||||
0x6E, 0x65, 0x72, 0x72, 0x75, 0x63, 0x00, 0x00, /*ToUInt64Key("curren")*/ 0xA4, 0x00, /*'\x00a4'*/
|
||||
0x6E, 0x65, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("yen")*/ 0xA5, 0x00, /*'\x00a5'*/
|
||||
0x72, 0x61, 0x62, 0x76, 0x72, 0x62, 0x00, 0x00, /*ToUInt64Key("brvbar")*/ 0xA6, 0x00, /*'\x00a6'*/
|
||||
0x74, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sect")*/ 0xA7, 0x00, /*'\x00a7'*/
|
||||
0x6C, 0x6D, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("uml")*/ 0xA8, 0x00, /*'\x00a8'*/
|
||||
0x79, 0x70, 0x6F, 0x63, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("copy")*/ 0xA9, 0x00, /*'\x00a9'*/
|
||||
0x66, 0x64, 0x72, 0x6F, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ordf")*/ 0xAA, 0x00, /*'\x00aa'*/
|
||||
0x6F, 0x75, 0x71, 0x61, 0x6C, 0x00, 0x00, 0x00, /*ToUInt64Key("laquo")*/ 0xAB, 0x00, /*'\x00ab'*/
|
||||
0x74, 0x6F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("not")*/ 0xAC, 0x00, /*'\x00ac'*/
|
||||
0x79, 0x68, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("shy")*/ 0xAD, 0x00, /*'\x00ad'*/
|
||||
0x67, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("reg")*/ 0xAE, 0x00, /*'\x00ae'*/
|
||||
0x72, 0x63, 0x61, 0x6D, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("macr")*/ 0xAF, 0x00, /*'\x00af'*/
|
||||
0x67, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("deg")*/ 0xB0, 0x00, /*'\x00b0'*/
|
||||
0x6E, 0x6D, 0x73, 0x75, 0x6C, 0x70, 0x00, 0x00, /*ToUInt64Key("plusmn")*/ 0xB1, 0x00, /*'\x00b1'*/
|
||||
0x32, 0x70, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sup2")*/ 0xB2, 0x00, /*'\x00b2'*/
|
||||
0x33, 0x70, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sup3")*/ 0xB3, 0x00, /*'\x00b3'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("acute")*/ 0xB4, 0x00, /*'\x00b4'*/
|
||||
0x6F, 0x72, 0x63, 0x69, 0x6D, 0x00, 0x00, 0x00, /*ToUInt64Key("micro")*/ 0xB5, 0x00, /*'\x00b5'*/
|
||||
0x61, 0x72, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("para")*/ 0xB6, 0x00, /*'\x00b6'*/
|
||||
0x74, 0x6F, 0x64, 0x64, 0x69, 0x6D, 0x00, 0x00, /*ToUInt64Key("middot")*/ 0xB7, 0x00, /*'\x00b7'*/
|
||||
0x6C, 0x69, 0x64, 0x65, 0x63, 0x00, 0x00, 0x00, /*ToUInt64Key("cedil")*/ 0xB8, 0x00, /*'\x00b8'*/
|
||||
0x31, 0x70, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sup1")*/ 0xB9, 0x00, /*'\x00b9'*/
|
||||
0x6D, 0x64, 0x72, 0x6F, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ordm")*/ 0xBA, 0x00, /*'\x00ba'*/
|
||||
0x6F, 0x75, 0x71, 0x61, 0x72, 0x00, 0x00, 0x00, /*ToUInt64Key("raquo")*/ 0xBB, 0x00, /*'\x00bb'*/
|
||||
0x34, 0x31, 0x63, 0x61, 0x72, 0x66, 0x00, 0x00, /*ToUInt64Key("frac14")*/ 0xBC, 0x00, /*'\x00bc'*/
|
||||
0x32, 0x31, 0x63, 0x61, 0x72, 0x66, 0x00, 0x00, /*ToUInt64Key("frac12")*/ 0xBD, 0x00, /*'\x00bd'*/
|
||||
0x34, 0x33, 0x63, 0x61, 0x72, 0x66, 0x00, 0x00, /*ToUInt64Key("frac34")*/ 0xBE, 0x00, /*'\x00be'*/
|
||||
0x74, 0x73, 0x65, 0x75, 0x71, 0x69, 0x00, 0x00, /*ToUInt64Key("iquest")*/ 0xBF, 0x00, /*'\x00bf'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x41, 0x00, 0x00, /*ToUInt64Key("Agrave")*/ 0xC0, 0x00, /*'\x00c0'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x41, 0x00, 0x00, /*ToUInt64Key("Aacute")*/ 0xC1, 0x00, /*'\x00c1'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x41, 0x00, 0x00, 0x00, /*ToUInt64Key("Acirc")*/ 0xC2, 0x00, /*'\x00c2'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x41, 0x00, 0x00, /*ToUInt64Key("Atilde")*/ 0xC3, 0x00, /*'\x00c3'*/
|
||||
0x6C, 0x6D, 0x75, 0x41, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Auml")*/ 0xC4, 0x00, /*'\x00c4'*/
|
||||
0x67, 0x6E, 0x69, 0x72, 0x41, 0x00, 0x00, 0x00, /*ToUInt64Key("Aring")*/ 0xC5, 0x00, /*'\x00c5'*/
|
||||
0x67, 0x69, 0x6C, 0x45, 0x41, 0x00, 0x00, 0x00, /*ToUInt64Key("AElig")*/ 0xC6, 0x00, /*'\x00c6'*/
|
||||
0x6C, 0x69, 0x64, 0x65, 0x63, 0x43, 0x00, 0x00, /*ToUInt64Key("Ccedil")*/ 0xC7, 0x00, /*'\x00c7'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x45, 0x00, 0x00, /*ToUInt64Key("Egrave")*/ 0xC8, 0x00, /*'\x00c8'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x45, 0x00, 0x00, /*ToUInt64Key("Eacute")*/ 0xC9, 0x00, /*'\x00c9'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x45, 0x00, 0x00, 0x00, /*ToUInt64Key("Ecirc")*/ 0xCA, 0x00, /*'\x00ca'*/
|
||||
0x6C, 0x6D, 0x75, 0x45, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Euml")*/ 0xCB, 0x00, /*'\x00cb'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x49, 0x00, 0x00, /*ToUInt64Key("Igrave")*/ 0xCC, 0x00, /*'\x00cc'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x49, 0x00, 0x00, /*ToUInt64Key("Iacute")*/ 0xCD, 0x00, /*'\x00cd'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x49, 0x00, 0x00, 0x00, /*ToUInt64Key("Icirc")*/ 0xCE, 0x00, /*'\x00ce'*/
|
||||
0x6C, 0x6D, 0x75, 0x49, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Iuml")*/ 0xCF, 0x00, /*'\x00cf'*/
|
||||
0x48, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ETH")*/ 0xD0, 0x00, /*'\x00d0'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x4E, 0x00, 0x00, /*ToUInt64Key("Ntilde")*/ 0xD1, 0x00, /*'\x00d1'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x4F, 0x00, 0x00, /*ToUInt64Key("Ograve")*/ 0xD2, 0x00, /*'\x00d2'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x4F, 0x00, 0x00, /*ToUInt64Key("Oacute")*/ 0xD3, 0x00, /*'\x00d3'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x4F, 0x00, 0x00, 0x00, /*ToUInt64Key("Ocirc")*/ 0xD4, 0x00, /*'\x00d4'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x4F, 0x00, 0x00, /*ToUInt64Key("Otilde")*/ 0xD5, 0x00, /*'\x00d5'*/
|
||||
0x6C, 0x6D, 0x75, 0x4F, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Ouml")*/ 0xD6, 0x00, /*'\x00d6'*/
|
||||
0x73, 0x65, 0x6D, 0x69, 0x74, 0x00, 0x00, 0x00, /*ToUInt64Key("times")*/ 0xD7, 0x00, /*'\x00d7'*/
|
||||
0x68, 0x73, 0x61, 0x6C, 0x73, 0x4F, 0x00, 0x00, /*ToUInt64Key("Oslash")*/ 0xD8, 0x00, /*'\x00d8'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x55, 0x00, 0x00, /*ToUInt64Key("Ugrave")*/ 0xD9, 0x00, /*'\x00d9'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x55, 0x00, 0x00, /*ToUInt64Key("Uacute")*/ 0xDA, 0x00, /*'\x00da'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x55, 0x00, 0x00, 0x00, /*ToUInt64Key("Ucirc")*/ 0xDB, 0x00, /*'\x00db'*/
|
||||
0x6C, 0x6D, 0x75, 0x55, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Uuml")*/ 0xDC, 0x00, /*'\x00dc'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x59, 0x00, 0x00, /*ToUInt64Key("Yacute")*/ 0xDD, 0x00, /*'\x00dd'*/
|
||||
0x4E, 0x52, 0x4F, 0x48, 0x54, 0x00, 0x00, 0x00, /*ToUInt64Key("THORN")*/ 0xDE, 0x00, /*'\x00de'*/
|
||||
0x67, 0x69, 0x6C, 0x7A, 0x73, 0x00, 0x00, 0x00, /*ToUInt64Key("szlig")*/ 0xDF, 0x00, /*'\x00df'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x61, 0x00, 0x00, /*ToUInt64Key("agrave")*/ 0xE0, 0x00, /*'\x00e0'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x61, 0x00, 0x00, /*ToUInt64Key("aacute")*/ 0xE1, 0x00, /*'\x00e1'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("acirc")*/ 0xE2, 0x00, /*'\x00e2'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x61, 0x00, 0x00, /*ToUInt64Key("atilde")*/ 0xE3, 0x00, /*'\x00e3'*/
|
||||
0x6C, 0x6D, 0x75, 0x61, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("auml")*/ 0xE4, 0x00, /*'\x00e4'*/
|
||||
0x67, 0x6E, 0x69, 0x72, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("aring")*/ 0xE5, 0x00, /*'\x00e5'*/
|
||||
0x67, 0x69, 0x6C, 0x65, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("aelig")*/ 0xE6, 0x00, /*'\x00e6'*/
|
||||
0x6C, 0x69, 0x64, 0x65, 0x63, 0x63, 0x00, 0x00, /*ToUInt64Key("ccedil")*/ 0xE7, 0x00, /*'\x00e7'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x65, 0x00, 0x00, /*ToUInt64Key("egrave")*/ 0xE8, 0x00, /*'\x00e8'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x65, 0x00, 0x00, /*ToUInt64Key("eacute")*/ 0xE9, 0x00, /*'\x00e9'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x65, 0x00, 0x00, 0x00, /*ToUInt64Key("ecirc")*/ 0xEA, 0x00, /*'\x00ea'*/
|
||||
0x6C, 0x6D, 0x75, 0x65, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("euml")*/ 0xEB, 0x00, /*'\x00eb'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x69, 0x00, 0x00, /*ToUInt64Key("igrave")*/ 0xEC, 0x00, /*'\x00ec'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x69, 0x00, 0x00, /*ToUInt64Key("iacute")*/ 0xED, 0x00, /*'\x00ed'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x69, 0x00, 0x00, 0x00, /*ToUInt64Key("icirc")*/ 0xEE, 0x00, /*'\x00ee'*/
|
||||
0x6C, 0x6D, 0x75, 0x69, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("iuml")*/ 0xEF, 0x00, /*'\x00ef'*/
|
||||
0x68, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("eth")*/ 0xF0, 0x00, /*'\x00f0'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x6E, 0x00, 0x00, /*ToUInt64Key("ntilde")*/ 0xF1, 0x00, /*'\x00f1'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x6F, 0x00, 0x00, /*ToUInt64Key("ograve")*/ 0xF2, 0x00, /*'\x00f2'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x6F, 0x00, 0x00, /*ToUInt64Key("oacute")*/ 0xF3, 0x00, /*'\x00f3'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x6F, 0x00, 0x00, 0x00, /*ToUInt64Key("ocirc")*/ 0xF4, 0x00, /*'\x00f4'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x6F, 0x00, 0x00, /*ToUInt64Key("otilde")*/ 0xF5, 0x00, /*'\x00f5'*/
|
||||
0x6C, 0x6D, 0x75, 0x6F, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ouml")*/ 0xF6, 0x00, /*'\x00f6'*/
|
||||
0x65, 0x64, 0x69, 0x76, 0x69, 0x64, 0x00, 0x00, /*ToUInt64Key("divide")*/ 0xF7, 0x00, /*'\x00f7'*/
|
||||
0x68, 0x73, 0x61, 0x6C, 0x73, 0x6F, 0x00, 0x00, /*ToUInt64Key("oslash")*/ 0xF8, 0x00, /*'\x00f8'*/
|
||||
0x65, 0x76, 0x61, 0x72, 0x67, 0x75, 0x00, 0x00, /*ToUInt64Key("ugrave")*/ 0xF9, 0x00, /*'\x00f9'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x75, 0x00, 0x00, /*ToUInt64Key("uacute")*/ 0xFA, 0x00, /*'\x00fa'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x75, 0x00, 0x00, 0x00, /*ToUInt64Key("ucirc")*/ 0xFB, 0x00, /*'\x00fb'*/
|
||||
0x6C, 0x6D, 0x75, 0x75, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("uuml")*/ 0xFC, 0x00, /*'\x00fc'*/
|
||||
0x65, 0x74, 0x75, 0x63, 0x61, 0x79, 0x00, 0x00, /*ToUInt64Key("yacute")*/ 0xFD, 0x00, /*'\x00fd'*/
|
||||
0x6E, 0x72, 0x6F, 0x68, 0x74, 0x00, 0x00, 0x00, /*ToUInt64Key("thorn")*/ 0xFE, 0x00, /*'\x00fe'*/
|
||||
0x6C, 0x6D, 0x75, 0x79, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("yuml")*/ 0xFF, 0x00, /*'\x00ff'*/
|
||||
0x67, 0x69, 0x6C, 0x45, 0x4F, 0x00, 0x00, 0x00, /*ToUInt64Key("OElig")*/ 0x52, 0x01, /*'\x0152'*/
|
||||
0x67, 0x69, 0x6C, 0x65, 0x6F, 0x00, 0x00, 0x00, /*ToUInt64Key("oelig")*/ 0x53, 0x01, /*'\x0153'*/
|
||||
0x6E, 0x6F, 0x72, 0x61, 0x63, 0x53, 0x00, 0x00, /*ToUInt64Key("Scaron")*/ 0x60, 0x01, /*'\x0160'*/
|
||||
0x6E, 0x6F, 0x72, 0x61, 0x63, 0x73, 0x00, 0x00, /*ToUInt64Key("scaron")*/ 0x61, 0x01, /*'\x0161'*/
|
||||
0x6C, 0x6D, 0x75, 0x59, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Yuml")*/ 0x78, 0x01, /*'\x0178'*/
|
||||
0x66, 0x6F, 0x6E, 0x66, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("fnof")*/ 0x92, 0x01, /*'\x0192'*/
|
||||
0x63, 0x72, 0x69, 0x63, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("circ")*/ 0xC6, 0x02, /*'\x02c6'*/
|
||||
0x65, 0x64, 0x6C, 0x69, 0x74, 0x00, 0x00, 0x00, /*ToUInt64Key("tilde")*/ 0xDC, 0x02, /*'\x02dc'*/
|
||||
0x61, 0x68, 0x70, 0x6C, 0x41, 0x00, 0x00, 0x00, /*ToUInt64Key("Alpha")*/ 0x91, 0x03, /*'\x0391'*/
|
||||
0x61, 0x74, 0x65, 0x42, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Beta")*/ 0x92, 0x03, /*'\x0392'*/
|
||||
0x61, 0x6D, 0x6D, 0x61, 0x47, 0x00, 0x00, 0x00, /*ToUInt64Key("Gamma")*/ 0x93, 0x03, /*'\x0393'*/
|
||||
0x61, 0x74, 0x6C, 0x65, 0x44, 0x00, 0x00, 0x00, /*ToUInt64Key("Delta")*/ 0x94, 0x03, /*'\x0394'*/
|
||||
0x6E, 0x6F, 0x6C, 0x69, 0x73, 0x70, 0x45, 0x00, /*ToUInt64Key("Epsilon")*/ 0x95, 0x03, /*'\x0395'*/
|
||||
0x61, 0x74, 0x65, 0x5A, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Zeta")*/ 0x96, 0x03, /*'\x0396'*/
|
||||
0x61, 0x74, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Eta")*/ 0x97, 0x03, /*'\x0397'*/
|
||||
0x61, 0x74, 0x65, 0x68, 0x54, 0x00, 0x00, 0x00, /*ToUInt64Key("Theta")*/ 0x98, 0x03, /*'\x0398'*/
|
||||
0x61, 0x74, 0x6F, 0x49, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Iota")*/ 0x99, 0x03, /*'\x0399'*/
|
||||
0x61, 0x70, 0x70, 0x61, 0x4B, 0x00, 0x00, 0x00, /*ToUInt64Key("Kappa")*/ 0x9A, 0x03, /*'\x039a'*/
|
||||
0x61, 0x64, 0x62, 0x6D, 0x61, 0x4C, 0x00, 0x00, /*ToUInt64Key("Lambda")*/ 0x9B, 0x03, /*'\x039b'*/
|
||||
0x75, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Mu")*/ 0x9C, 0x03, /*'\x039c'*/
|
||||
0x75, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Nu")*/ 0x9D, 0x03, /*'\x039d'*/
|
||||
0x69, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Xi")*/ 0x9E, 0x03, /*'\x039e'*/
|
||||
0x6E, 0x6F, 0x72, 0x63, 0x69, 0x6D, 0x4F, 0x00, /*ToUInt64Key("Omicron")*/ 0x9F, 0x03, /*'\x039f'*/
|
||||
0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Pi")*/ 0xA0, 0x03, /*'\x03a0'*/
|
||||
0x6F, 0x68, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Rho")*/ 0xA1, 0x03, /*'\x03a1'*/
|
||||
0x61, 0x6D, 0x67, 0x69, 0x53, 0x00, 0x00, 0x00, /*ToUInt64Key("Sigma")*/ 0xA3, 0x03, /*'\x03a3'*/
|
||||
0x75, 0x61, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Tau")*/ 0xA4, 0x03, /*'\x03a4'*/
|
||||
0x6E, 0x6F, 0x6C, 0x69, 0x73, 0x70, 0x55, 0x00, /*ToUInt64Key("Upsilon")*/ 0xA5, 0x03, /*'\x03a5'*/
|
||||
0x69, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Phi")*/ 0xA6, 0x03, /*'\x03a6'*/
|
||||
0x69, 0x68, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Chi")*/ 0xA7, 0x03, /*'\x03a7'*/
|
||||
0x69, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("Psi")*/ 0xA8, 0x03, /*'\x03a8'*/
|
||||
0x61, 0x67, 0x65, 0x6D, 0x4F, 0x00, 0x00, 0x00, /*ToUInt64Key("Omega")*/ 0xA9, 0x03, /*'\x03a9'*/
|
||||
0x61, 0x68, 0x70, 0x6C, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("alpha")*/ 0xB1, 0x03, /*'\x03b1'*/
|
||||
0x61, 0x74, 0x65, 0x62, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("beta")*/ 0xB2, 0x03, /*'\x03b2'*/
|
||||
0x61, 0x6D, 0x6D, 0x61, 0x67, 0x00, 0x00, 0x00, /*ToUInt64Key("gamma")*/ 0xB3, 0x03, /*'\x03b3'*/
|
||||
0x61, 0x74, 0x6C, 0x65, 0x64, 0x00, 0x00, 0x00, /*ToUInt64Key("delta")*/ 0xB4, 0x03, /*'\x03b4'*/
|
||||
0x6E, 0x6F, 0x6C, 0x69, 0x73, 0x70, 0x65, 0x00, /*ToUInt64Key("epsilon")*/ 0xB5, 0x03, /*'\x03b5'*/
|
||||
0x61, 0x74, 0x65, 0x7A, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("zeta")*/ 0xB6, 0x03, /*'\x03b6'*/
|
||||
0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("eta")*/ 0xB7, 0x03, /*'\x03b7'*/
|
||||
0x61, 0x74, 0x65, 0x68, 0x74, 0x00, 0x00, 0x00, /*ToUInt64Key("theta")*/ 0xB8, 0x03, /*'\x03b8'*/
|
||||
0x61, 0x74, 0x6F, 0x69, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("iota")*/ 0xB9, 0x03, /*'\x03b9'*/
|
||||
0x61, 0x70, 0x70, 0x61, 0x6B, 0x00, 0x00, 0x00, /*ToUInt64Key("kappa")*/ 0xBA, 0x03, /*'\x03ba'*/
|
||||
0x61, 0x64, 0x62, 0x6D, 0x61, 0x6C, 0x00, 0x00, /*ToUInt64Key("lambda")*/ 0xBB, 0x03, /*'\x03bb'*/
|
||||
0x75, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("mu")*/ 0xBC, 0x03, /*'\x03bc'*/
|
||||
0x75, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("nu")*/ 0xBD, 0x03, /*'\x03bd'*/
|
||||
0x69, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("xi")*/ 0xBE, 0x03, /*'\x03be'*/
|
||||
0x6E, 0x6F, 0x72, 0x63, 0x69, 0x6D, 0x6F, 0x00, /*ToUInt64Key("omicron")*/ 0xBF, 0x03, /*'\x03bf'*/
|
||||
0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("pi")*/ 0xC0, 0x03, /*'\x03c0'*/
|
||||
0x6F, 0x68, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("rho")*/ 0xC1, 0x03, /*'\x03c1'*/
|
||||
0x66, 0x61, 0x6D, 0x67, 0x69, 0x73, 0x00, 0x00, /*ToUInt64Key("sigmaf")*/ 0xC2, 0x03, /*'\x03c2'*/
|
||||
0x61, 0x6D, 0x67, 0x69, 0x73, 0x00, 0x00, 0x00, /*ToUInt64Key("sigma")*/ 0xC3, 0x03, /*'\x03c3'*/
|
||||
0x75, 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("tau")*/ 0xC4, 0x03, /*'\x03c4'*/
|
||||
0x6E, 0x6F, 0x6C, 0x69, 0x73, 0x70, 0x75, 0x00, /*ToUInt64Key("upsilon")*/ 0xC5, 0x03, /*'\x03c5'*/
|
||||
0x69, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("phi")*/ 0xC6, 0x03, /*'\x03c6'*/
|
||||
0x69, 0x68, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("chi")*/ 0xC7, 0x03, /*'\x03c7'*/
|
||||
0x69, 0x73, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("psi")*/ 0xC8, 0x03, /*'\x03c8'*/
|
||||
0x61, 0x67, 0x65, 0x6D, 0x6F, 0x00, 0x00, 0x00, /*ToUInt64Key("omega")*/ 0xC9, 0x03, /*'\x03c9'*/
|
||||
0x6D, 0x79, 0x73, 0x61, 0x74, 0x65, 0x68, 0x74, /*ToUInt64Key("thetasym")*/0xD1, 0x03, /*'\x03d1'*/
|
||||
0x68, 0x69, 0x73, 0x70, 0x75, 0x00, 0x00, 0x00, /*ToUInt64Key("upsih")*/ 0xD2, 0x03, /*'\x03d2'*/
|
||||
0x76, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("piv")*/ 0xD6, 0x03, /*'\x03d6'*/
|
||||
0x70, 0x73, 0x6E, 0x65, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ensp")*/ 0x02, 0x20, /*'\x2002'*/
|
||||
0x70, 0x73, 0x6D, 0x65, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("emsp")*/ 0x03, 0x20, /*'\x2003'*/
|
||||
0x70, 0x73, 0x6E, 0x69, 0x68, 0x74, 0x00, 0x00, /*ToUInt64Key("thinsp")*/ 0x09, 0x20, /*'\x2009'*/
|
||||
0x6A, 0x6E, 0x77, 0x7A, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("zwnj")*/ 0x0C, 0x20, /*'\x200c'*/
|
||||
0x6A, 0x77, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("zwj")*/ 0x0D, 0x20, /*'\x200d'*/
|
||||
0x6D, 0x72, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("lrm")*/ 0x0E, 0x20, /*'\x200e'*/
|
||||
0x6D, 0x6C, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("rlm")*/ 0x0F, 0x20, /*'\x200f'*/
|
||||
0x68, 0x73, 0x61, 0x64, 0x6E, 0x00, 0x00, 0x00, /*ToUInt64Key("ndash")*/ 0x13, 0x20, /*'\x2013'*/
|
||||
0x68, 0x73, 0x61, 0x64, 0x6D, 0x00, 0x00, 0x00, /*ToUInt64Key("mdash")*/ 0x14, 0x20, /*'\x2014'*/
|
||||
0x6F, 0x75, 0x71, 0x73, 0x6C, 0x00, 0x00, 0x00, /*ToUInt64Key("lsquo")*/ 0x18, 0x20, /*'\x2018'*/
|
||||
0x6F, 0x75, 0x71, 0x73, 0x72, 0x00, 0x00, 0x00, /*ToUInt64Key("rsquo")*/ 0x19, 0x20, /*'\x2019'*/
|
||||
0x6F, 0x75, 0x71, 0x62, 0x73, 0x00, 0x00, 0x00, /*ToUInt64Key("sbquo")*/ 0x1A, 0x20, /*'\x201a'*/
|
||||
0x6F, 0x75, 0x71, 0x64, 0x6C, 0x00, 0x00, 0x00, /*ToUInt64Key("ldquo")*/ 0x1C, 0x20, /*'\x201c'*/
|
||||
0x6F, 0x75, 0x71, 0x64, 0x72, 0x00, 0x00, 0x00, /*ToUInt64Key("rdquo")*/ 0x1D, 0x20, /*'\x201d'*/
|
||||
0x6F, 0x75, 0x71, 0x64, 0x62, 0x00, 0x00, 0x00, /*ToUInt64Key("bdquo")*/ 0x1E, 0x20, /*'\x201e'*/
|
||||
0x72, 0x65, 0x67, 0x67, 0x61, 0x64, 0x00, 0x00, /*ToUInt64Key("dagger")*/ 0x20, 0x20, /*'\x2020'*/
|
||||
0x72, 0x65, 0x67, 0x67, 0x61, 0x44, 0x00, 0x00, /*ToUInt64Key("Dagger")*/ 0x21, 0x20, /*'\x2021'*/
|
||||
0x6C, 0x6C, 0x75, 0x62, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("bull")*/ 0x22, 0x20, /*'\x2022'*/
|
||||
0x70, 0x69, 0x6C, 0x6C, 0x65, 0x68, 0x00, 0x00, /*ToUInt64Key("hellip")*/ 0x26, 0x20, /*'\x2026'*/
|
||||
0x6C, 0x69, 0x6D, 0x72, 0x65, 0x70, 0x00, 0x00, /*ToUInt64Key("permil")*/ 0x30, 0x20, /*'\x2030'*/
|
||||
0x65, 0x6D, 0x69, 0x72, 0x70, 0x00, 0x00, 0x00, /*ToUInt64Key("prime")*/ 0x32, 0x20, /*'\x2032'*/
|
||||
0x65, 0x6D, 0x69, 0x72, 0x50, 0x00, 0x00, 0x00, /*ToUInt64Key("Prime")*/ 0x33, 0x20, /*'\x2033'*/
|
||||
0x6F, 0x75, 0x71, 0x61, 0x73, 0x6C, 0x00, 0x00, /*ToUInt64Key("lsaquo")*/ 0x39, 0x20, /*'\x2039'*/
|
||||
0x6F, 0x75, 0x71, 0x61, 0x73, 0x72, 0x00, 0x00, /*ToUInt64Key("rsaquo")*/ 0x3A, 0x20, /*'\x203a'*/
|
||||
0x65, 0x6E, 0x69, 0x6C, 0x6F, 0x00, 0x00, 0x00, /*ToUInt64Key("oline")*/ 0x3E, 0x20, /*'\x203e'*/
|
||||
0x6C, 0x73, 0x61, 0x72, 0x66, 0x00, 0x00, 0x00, /*ToUInt64Key("frasl")*/ 0x44, 0x20, /*'\x2044'*/
|
||||
0x6F, 0x72, 0x75, 0x65, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("euro")*/ 0xAC, 0x20, /*'\x20ac'*/
|
||||
0x65, 0x67, 0x61, 0x6D, 0x69, 0x00, 0x00, 0x00, /*ToUInt64Key("image")*/ 0x11, 0x21, /*'\x2111'*/
|
||||
0x70, 0x72, 0x65, 0x69, 0x65, 0x77, 0x00, 0x00, /*ToUInt64Key("weierp")*/ 0x18, 0x21, /*'\x2118'*/
|
||||
0x6C, 0x61, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("real")*/ 0x1C, 0x21, /*'\x211c'*/
|
||||
0x65, 0x64, 0x61, 0x72, 0x74, 0x00, 0x00, 0x00, /*ToUInt64Key("trade")*/ 0x22, 0x21, /*'\x2122'*/
|
||||
0x6D, 0x79, 0x73, 0x66, 0x65, 0x6C, 0x61, 0x00, /*ToUInt64Key("alefsym")*/ 0x35, 0x21, /*'\x2135'*/
|
||||
0x72, 0x72, 0x61, 0x6C, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("larr")*/ 0x90, 0x21, /*'\x2190'*/
|
||||
0x72, 0x72, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("uarr")*/ 0x91, 0x21, /*'\x2191'*/
|
||||
0x72, 0x72, 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("rarr")*/ 0x92, 0x21, /*'\x2192'*/
|
||||
0x72, 0x72, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("darr")*/ 0x93, 0x21, /*'\x2193'*/
|
||||
0x72, 0x72, 0x61, 0x68, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("harr")*/ 0x94, 0x21, /*'\x2194'*/
|
||||
0x72, 0x72, 0x61, 0x72, 0x63, 0x00, 0x00, 0x00, /*ToUInt64Key("crarr")*/ 0xB5, 0x21, /*'\x21b5'*/
|
||||
0x72, 0x72, 0x41, 0x6C, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("lArr")*/ 0xD0, 0x21, /*'\x21d0'*/
|
||||
0x72, 0x72, 0x41, 0x75, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("uArr")*/ 0xD1, 0x21, /*'\x21d1'*/
|
||||
0x72, 0x72, 0x41, 0x72, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("rArr")*/ 0xD2, 0x21, /*'\x21d2'*/
|
||||
0x72, 0x72, 0x41, 0x64, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("dArr")*/ 0xD3, 0x21, /*'\x21d3'*/
|
||||
0x72, 0x72, 0x41, 0x68, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("hArr")*/ 0xD4, 0x21, /*'\x21d4'*/
|
||||
0x6C, 0x6C, 0x61, 0x72, 0x6F, 0x66, 0x00, 0x00, /*ToUInt64Key("forall")*/ 0x00, 0x22, /*'\x2200'*/
|
||||
0x74, 0x72, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("part")*/ 0x02, 0x22, /*'\x2202'*/
|
||||
0x74, 0x73, 0x69, 0x78, 0x65, 0x00, 0x00, 0x00, /*ToUInt64Key("exist")*/ 0x03, 0x22, /*'\x2203'*/
|
||||
0x79, 0x74, 0x70, 0x6D, 0x65, 0x00, 0x00, 0x00, /*ToUInt64Key("empty")*/ 0x05, 0x22, /*'\x2205'*/
|
||||
0x61, 0x6C, 0x62, 0x61, 0x6E, 0x00, 0x00, 0x00, /*ToUInt64Key("nabla")*/ 0x07, 0x22, /*'\x2207'*/
|
||||
0x6E, 0x69, 0x73, 0x69, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("isin")*/ 0x08, 0x22, /*'\x2208'*/
|
||||
0x6E, 0x69, 0x74, 0x6F, 0x6E, 0x00, 0x00, 0x00, /*ToUInt64Key("notin")*/ 0x09, 0x22, /*'\x2209'*/
|
||||
0x69, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ni")*/ 0x0B, 0x22, /*'\x220b'*/
|
||||
0x64, 0x6F, 0x72, 0x70, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("prod")*/ 0x0F, 0x22, /*'\x220f'*/
|
||||
0x6D, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sum")*/ 0x11, 0x22, /*'\x2211'*/
|
||||
0x73, 0x75, 0x6E, 0x69, 0x6D, 0x00, 0x00, 0x00, /*ToUInt64Key("minus")*/ 0x12, 0x22, /*'\x2212'*/
|
||||
0x74, 0x73, 0x61, 0x77, 0x6F, 0x6C, 0x00, 0x00, /*ToUInt64Key("lowast")*/ 0x17, 0x22, /*'\x2217'*/
|
||||
0x63, 0x69, 0x64, 0x61, 0x72, 0x00, 0x00, 0x00, /*ToUInt64Key("radic")*/ 0x1A, 0x22, /*'\x221a'*/
|
||||
0x70, 0x6F, 0x72, 0x70, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("prop")*/ 0x1D, 0x22, /*'\x221d'*/
|
||||
0x6E, 0x69, 0x66, 0x6E, 0x69, 0x00, 0x00, 0x00, /*ToUInt64Key("infin")*/ 0x1E, 0x22, /*'\x221e'*/
|
||||
0x67, 0x6E, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ang")*/ 0x20, 0x22, /*'\x2220'*/
|
||||
0x64, 0x6E, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("and")*/ 0x27, 0x22, /*'\x2227'*/
|
||||
0x72, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("or")*/ 0x28, 0x22, /*'\x2228'*/
|
||||
0x70, 0x61, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("cap")*/ 0x29, 0x22, /*'\x2229'*/
|
||||
0x70, 0x75, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("cup")*/ 0x2A, 0x22, /*'\x222a'*/
|
||||
0x74, 0x6E, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("int")*/ 0x2B, 0x22, /*'\x222b'*/
|
||||
0x34, 0x65, 0x72, 0x65, 0x68, 0x74, 0x00, 0x00, /*ToUInt64Key("there4")*/ 0x34, 0x22, /*'\x2234'*/
|
||||
0x6D, 0x69, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sim")*/ 0x3C, 0x22, /*'\x223c'*/
|
||||
0x67, 0x6E, 0x6F, 0x63, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("cong")*/ 0x45, 0x22, /*'\x2245'*/
|
||||
0x70, 0x6D, 0x79, 0x73, 0x61, 0x00, 0x00, 0x00, /*ToUInt64Key("asymp")*/ 0x48, 0x22, /*'\x2248'*/
|
||||
0x65, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ne")*/ 0x60, 0x22, /*'\x2260'*/
|
||||
0x76, 0x69, 0x75, 0x71, 0x65, 0x00, 0x00, 0x00, /*ToUInt64Key("equiv")*/ 0x61, 0x22, /*'\x2261'*/
|
||||
0x65, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("le")*/ 0x64, 0x22, /*'\x2264'*/
|
||||
0x65, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("ge")*/ 0x65, 0x22, /*'\x2265'*/
|
||||
0x62, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sub")*/ 0x82, 0x22, /*'\x2282'*/
|
||||
0x70, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sup")*/ 0x83, 0x22, /*'\x2283'*/
|
||||
0x62, 0x75, 0x73, 0x6E, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("nsub")*/ 0x84, 0x22, /*'\x2284'*/
|
||||
0x65, 0x62, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sube")*/ 0x86, 0x22, /*'\x2286'*/
|
||||
0x65, 0x70, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("supe")*/ 0x87, 0x22, /*'\x2287'*/
|
||||
0x73, 0x75, 0x6C, 0x70, 0x6F, 0x00, 0x00, 0x00, /*ToUInt64Key("oplus")*/ 0x95, 0x22, /*'\x2295'*/
|
||||
0x73, 0x65, 0x6D, 0x69, 0x74, 0x6F, 0x00, 0x00, /*ToUInt64Key("otimes")*/ 0x97, 0x22, /*'\x2297'*/
|
||||
0x70, 0x72, 0x65, 0x70, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("perp")*/ 0xA5, 0x22, /*'\x22a5'*/
|
||||
0x74, 0x6F, 0x64, 0x73, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("sdot")*/ 0xC5, 0x22, /*'\x22c5'*/
|
||||
0x6C, 0x69, 0x65, 0x63, 0x6C, 0x00, 0x00, 0x00, /*ToUInt64Key("lceil")*/ 0x08, 0x23, /*'\x2308'*/
|
||||
0x6C, 0x69, 0x65, 0x63, 0x72, 0x00, 0x00, 0x00, /*ToUInt64Key("rceil")*/ 0x09, 0x23, /*'\x2309'*/
|
||||
0x72, 0x6F, 0x6F, 0x6C, 0x66, 0x6C, 0x00, 0x00, /*ToUInt64Key("lfloor")*/ 0x0A, 0x23, /*'\x230a'*/
|
||||
0x72, 0x6F, 0x6F, 0x6C, 0x66, 0x72, 0x00, 0x00, /*ToUInt64Key("rfloor")*/ 0x0B, 0x23, /*'\x230b'*/
|
||||
0x67, 0x6E, 0x61, 0x6C, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("lang")*/ 0x29, 0x23, /*'\x2329'*/
|
||||
0x67, 0x6E, 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("rang")*/ 0x2A, 0x23, /*'\x232a'*/
|
||||
0x7A, 0x6F, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, /*ToUInt64Key("loz")*/ 0xCA, 0x25, /*'\x25ca'*/
|
||||
0x73, 0x65, 0x64, 0x61, 0x70, 0x73, 0x00, 0x00, /*ToUInt64Key("spades")*/ 0x60, 0x26, /*'\x2660'*/
|
||||
0x73, 0x62, 0x75, 0x6C, 0x63, 0x00, 0x00, 0x00, /*ToUInt64Key("clubs")*/ 0x63, 0x26, /*'\x2663'*/
|
||||
0x73, 0x74, 0x72, 0x61, 0x65, 0x68, 0x00, 0x00, /*ToUInt64Key("hearts")*/ 0x65, 0x26, /*'\x2665'*/
|
||||
0x73, 0x6D, 0x61, 0x69, 0x64, 0x00, 0x00, 0x00, /*ToUInt64Key("diams")*/ 0x66, 0x26, /*'\x2666'*/
|
||||
];
|
||||
|
||||
var dictionary = new Dictionary<ulong, char>(tableData.Length / (sizeof(ulong) + sizeof(char)));
|
||||
while (tableData.Length > 0)
|
||||
{
|
||||
ulong key = BitConverter.ToUInt64(tableData, 0);
|
||||
char value = (char)BitConverter.ToUInt16(tableData, sizeof(ulong));
|
||||
dictionary[key] = value;
|
||||
|
||||
byte[] tempTableData = new byte[tableData.Length - (sizeof(ulong) + sizeof(char))];
|
||||
Array.Copy(tableData, (sizeof(ulong) + sizeof(char)), tempTableData, 0, tempTableData.Length);
|
||||
tableData = tempTableData;
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
// maps entity strings => unicode chars
|
||||
private static readonly Dictionary<ulong, char> s_lookupTable = InitializeLookupTable();
|
||||
|
||||
public static char Lookup(char[] entity)
|
||||
{
|
||||
// To avoid an allocation, keys of type "ulong" are used in the lookup table.
|
||||
// Since all entity strings comprise 8 characters or less and are ASCII-only, they "fit" into an ulong (8 bytes).
|
||||
if (entity.Length <= 8)
|
||||
{
|
||||
s_lookupTable.TryGetValue(ToUInt64Key(entity), out char result);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Currently, there are no entities that are longer than 8 characters.
|
||||
return (char)0;
|
||||
}
|
||||
}
|
||||
|
||||
private static ulong ToUInt64Key(char[] entity)
|
||||
{
|
||||
// The ulong key is the reversed single-byte character representation of the actual entity string.
|
||||
ulong key = 0;
|
||||
for (int i = 0; i < entity.Length; i++)
|
||||
{
|
||||
if (entity[i] > 0xFF)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
key = (key << 8) | entity[i];
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -30,10 +30,6 @@
|
||||
<None Include="README.md" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SabreTools.RedumpLib\SabreTools.RedumpLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MinAsyncBridge" Version="0.12.4" Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))" />
|
||||
<PackageReference Include="Net35.Actions" Version="1.4.0" Condition="$(TargetFramework.StartsWith(`net2`))" />
|
||||
|
||||
@@ -5,11 +5,8 @@ using System.Net;
|
||||
#endif
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Web;
|
||||
using Constants = SabreTools.RedumpLib.Legacy.Data.Constants;
|
||||
using Language = SabreTools.RedumpLib.Legacy.Data.Language;
|
||||
using SubmissionInfo = SabreTools.RedumpLib.Legacy.Data.SubmissionInfo;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
@@ -94,7 +91,7 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
match = Constants.RegionRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.CommonDiscInfo.Region = Data.Extensions.ToRegion(match.Groups[1].Value);
|
||||
info.CommonDiscInfo.Region = match.Groups[1].Value.ToRegion();
|
||||
}
|
||||
|
||||
// Languages
|
||||
@@ -107,7 +104,7 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
if (submatch is null)
|
||||
continue;
|
||||
|
||||
var language = Data.Extensions.ToLanguage(submatch.Groups[1].Value);
|
||||
var language = submatch.Groups[1].Value.ToLanguage();
|
||||
if (language is not null)
|
||||
tempLanguages.Add(language);
|
||||
}
|
||||
@@ -449,20 +446,20 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
}
|
||||
|
||||
// For some outdated tags, we need to use alternate names
|
||||
text = text.Replace("<b>Demos</b>:", ((SiteCode?)SiteCode.PlayableDemos).ShortName());
|
||||
text = text.Replace("<b>Disney ID</b>:", ((SiteCode?)SiteCode.DisneyInteractiveID).ShortName());
|
||||
text = text.Replace("DMI:", ((SiteCode?)SiteCode.DMIHash).ShortName());
|
||||
text = text.Replace("<b>LucasArts ID</b>:", ((SiteCode?)SiteCode.LucasArtsID).ShortName());
|
||||
text = text.Replace("PFI:", ((SiteCode?)SiteCode.PFIHash).ShortName());
|
||||
text = text.Replace("SS:", ((SiteCode?)SiteCode.SSHash).ShortName());
|
||||
text = text.Replace("SSv1:", ((SiteCode?)SiteCode.SSHash).ShortName());
|
||||
text = text.Replace("<b>SSv1</b>:", ((SiteCode?)SiteCode.SSHash).ShortName());
|
||||
text = text.Replace("SSv2:", ((SiteCode?)SiteCode.SSHash).ShortName());
|
||||
text = text.Replace("<b>SSv2</b>:", ((SiteCode?)SiteCode.SSHash).ShortName());
|
||||
text = text.Replace("SS version:", ((SiteCode?)SiteCode.SSVersion).ShortName());
|
||||
text = text.Replace("Universal Hash (SHA-1):", ((SiteCode?)SiteCode.UniversalHash).ShortName());
|
||||
text = text.Replace("XeMID:", ((SiteCode?)SiteCode.XeMID).ShortName());
|
||||
text = text.Replace("XMID:", ((SiteCode?)SiteCode.XMID).ShortName());
|
||||
text = text.Replace("<b>Demos</b>:", SiteCode.PlayableDemos.ShortName());
|
||||
text = text.Replace("<b>Disney ID</b>:", SiteCode.DisneyInteractiveID.ShortName());
|
||||
text = text.Replace("DMI:", SiteCode.DMIHash.ShortName());
|
||||
text = text.Replace("<b>LucasArts ID</b>:", SiteCode.LucasArtsID.ShortName());
|
||||
text = text.Replace("PFI:", SiteCode.PFIHash.ShortName());
|
||||
text = text.Replace("SS:", SiteCode.SSHash.ShortName());
|
||||
text = text.Replace("SSv1:", SiteCode.SSHash.ShortName());
|
||||
text = text.Replace("<b>SSv1</b>:", SiteCode.SSHash.ShortName());
|
||||
text = text.Replace("SSv2:", SiteCode.SSHash.ShortName());
|
||||
text = text.Replace("<b>SSv2</b>:", SiteCode.SSHash.ShortName());
|
||||
text = text.Replace("SS version:", SiteCode.SSVersion.ShortName());
|
||||
text = text.Replace("Universal Hash (SHA-1):", SiteCode.UniversalHash.ShortName());
|
||||
text = text.Replace("XeMID:", SiteCode.XeMID.ShortName());
|
||||
text = text.Replace("XMID:", SiteCode.XMID.ShortName());
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data.Sections;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
using SubmissionInfo = SabreTools.RedumpLib.Legacy.Data.SubmissionInfo;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
@@ -276,13 +273,13 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
List<int>? partiallyMatchedIDs)
|
||||
{
|
||||
// Extract the size from the hashes
|
||||
long size = RedumpLib.Data.Extensions.ExtractSizeFromHashData(tawo?.ClrMameProData);
|
||||
long size = Extensions.ExtractSizeFromHashData(tawo?.ClrMameProData);
|
||||
|
||||
output.AppendLine("Common Disc Info:");
|
||||
|
||||
AddIfExists(output, Template.TitleField, section?.Title, 1);
|
||||
AddIfExists(output, Template.ForeignTitleField, section?.ForeignTitleNonLatin, 1);
|
||||
AddIfExists(output, Template.DiscNumberField, section?.DiscNumberLetter, 1);
|
||||
AddIfExists(output, Template.ForeignTitleNonLatinField, section?.ForeignTitleNonLatin, 1);
|
||||
AddIfExists(output, Template.DiscNumberLetterField, section?.DiscNumberLetter, 1);
|
||||
AddIfExists(output, Template.DiscTitleField, section?.DiscTitle, 1);
|
||||
AddIfExists(output, Template.SystemField, section?.System.LongName(), 1);
|
||||
AddIfExists(output, Template.MediaTypeField, GetFixedMediaType(
|
||||
@@ -294,14 +291,14 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
sac?.Layerbreak3),
|
||||
1);
|
||||
AddIfExists(output, Template.CategoryField, section?.Category.LongName(), 1);
|
||||
AddIfExists(output, Template.FullyMatchingIDsField, fullyMatchedID?.ToString(), 1);
|
||||
AddIfExists(output, Template.FullyMatchingIDField, fullyMatchedID?.ToString(), 1);
|
||||
AddIfExists(output, Template.PartiallyMatchingIDsField, partiallyMatchedIDs, 1);
|
||||
AddIfExists(output, Template.RegionsField, section?.Region.LongName() ?? "SPACE! (CHANGE THIS)", 1);
|
||||
AddIfExists(output, Template.RegionField, section?.Region.LongName() ?? "SPACE! (CHANGE THIS)", 1);
|
||||
AddIfExists(output, Template.LanguagesField,
|
||||
Array.ConvertAll(section?.Languages ?? [null], l => l.LongName() ?? "ADD LANGUAGES HERE (ONLY IF YOU TESTED)"), 1);
|
||||
AddIfExists(output, Template.PlaystationLanguageSelectionViaField,
|
||||
Array.ConvertAll(section?.LanguageSelection ?? [], l => l.LongName()), 1);
|
||||
AddIfExists(output, Template.DiscSerialsField, section?.Serial, 1);
|
||||
AddIfExists(output, Template.SerialField, section?.Serial, 1);
|
||||
output.AppendLine();
|
||||
|
||||
// All ringcode information goes in an indented area
|
||||
@@ -311,74 +308,74 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
// If we have a triple-layer disc
|
||||
if (sac?.Layerbreak3 != default && sac?.Layerbreak3 != default(long))
|
||||
{
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringCodeField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringRingField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringSIDField, section?.Layer0MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampsField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDsField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldsField, section?.Layer0AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampMasteringCodeField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldField, section?.Layer0AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringCodeField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringRingField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringSIDField, section?.Layer1MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampsField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDsField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldsField, section?.Layer1AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampMasteringCodeField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldField, section?.Layer1AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringCodeField, section?.Layer2MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringRingField, section?.Layer2MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringSIDField, section?.Layer2MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.ToolstampsField, section?.Layer2ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.ToolstampMasteringCodeField, section?.Layer2ToolstampMasteringCode, 0);
|
||||
|
||||
AddIfExists(output, "Layer 3 " + Template.MasteringCodeField, section?.Layer3MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 3 " + Template.MasteringRingField, section?.Layer3MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 3 " + Template.MasteringSIDField, section?.Layer3MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 3 " + Template.ToolstampsField, section?.Layer3ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Layer 3 " + Template.ToolstampMasteringCodeField, section?.Layer3ToolstampMasteringCode, 0);
|
||||
}
|
||||
// If we have a triple-layer disc
|
||||
else if (sac?.Layerbreak2 != default && sac?.Layerbreak2 != default(long))
|
||||
{
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringCodeField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringRingField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringSIDField, section?.Layer0MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampsField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDsField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldsField, section?.Layer0AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampMasteringCodeField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldField, section?.Layer0AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringCodeField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringRingField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringSIDField, section?.Layer1MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampsField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDsField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldsField, section?.Layer1AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampMasteringCodeField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldField, section?.Layer1AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringCodeField, section?.Layer2MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringRingField, section?.Layer2MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.MasteringSIDField, section?.Layer2MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.ToolstampsField, section?.Layer2ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Layer 2 " + Template.ToolstampMasteringCodeField, section?.Layer2ToolstampMasteringCode, 0);
|
||||
}
|
||||
// If we have a dual-layer disc
|
||||
else if (sac?.Layerbreak != default && sac?.Layerbreak != default(long))
|
||||
{
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringCodeField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringRingField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.MasteringSIDField, section?.Layer0MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampsField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDsField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldsField, section?.Layer0AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 0 " + Template.ToolstampMasteringCodeField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldField, section?.Layer0AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringCodeField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringRingField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.MasteringSIDField, section?.Layer1MasteringSID, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampsField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDsField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldsField, section?.Layer1AdditionalMould, 0);
|
||||
AddIfExists(output, "Layer 1 " + Template.ToolstampMasteringCodeField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldField, section?.Layer1AdditionalMould, 0);
|
||||
}
|
||||
// If we have a single-layer disc
|
||||
else
|
||||
{
|
||||
AddIfExists(output, "Data Side " + Template.MasteringCodeField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MasteringRingField, section?.Layer0MasteringRing, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MasteringSIDField, section?.Layer0MasteringSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.ToolstampsField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDsField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldsField, section?.Layer0AdditionalMould, 0);
|
||||
AddIfExists(output, "Data Side " + Template.ToolstampMasteringCodeField, section?.Layer0ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Data Side " + Template.MouldSIDField, section?.Layer0MouldSID, 0);
|
||||
AddIfExists(output, "Data Side " + Template.AdditionalMouldField, section?.Layer0AdditionalMould, 0);
|
||||
|
||||
AddIfExists(output, "Label Side " + Template.MasteringCodeField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MasteringRingField, section?.Layer1MasteringRing, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MasteringSIDField, section?.Layer1MasteringSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.ToolstampsField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDsField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldsField, section?.Layer1AdditionalMould, 0);
|
||||
AddIfExists(output, "Label Side " + Template.ToolstampMasteringCodeField, section?.Layer1ToolstampMasteringCode, 0);
|
||||
AddIfExists(output, "Label Side " + Template.MouldSIDField, section?.Layer1MouldSID, 0);
|
||||
AddIfExists(output, "Label Side " + Template.AdditionalMouldField, section?.Layer1AdditionalMould, 0);
|
||||
}
|
||||
|
||||
var offset = tawo?.OtherWriteOffsets;
|
||||
@@ -388,9 +385,9 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
AddIfExists(output, Template.WriteOffsetField, offset, 0);
|
||||
output.AppendLine();
|
||||
|
||||
AddIfExists(output, Template.BarcodesField, section?.Barcode, 1);
|
||||
AddIfExists(output, Template.EXEDate, section?.EXEDateBuildDate, 1);
|
||||
AddIfExists(output, Template.ErrorCountField, section?.ErrorsCount, 1);
|
||||
AddIfExists(output, Template.BarcodeField, section?.Barcode, 1);
|
||||
AddIfExists(output, Template.EXEDateBuildDate, section?.EXEDateBuildDate, 1);
|
||||
AddIfExists(output, Template.ErrorsCountField, section?.ErrorsCount, 1);
|
||||
AddIfExists(output, Template.CommentsField, section?.Comments?.Trim(), 1);
|
||||
AddIfExists(output, Template.ContentsField, section?.Contents?.Trim(), 1);
|
||||
}
|
||||
@@ -446,11 +443,11 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
AddIfExists(output, Template.PICField, section.PIC, 1);
|
||||
AddIfExists(output, Template.HeaderField, section.Header, 1);
|
||||
AddIfExists(output, Template.BCAField, section.BCA, 1);
|
||||
AddIfExists(output, Template.SectorRangesField, section.SecuritySectorRanges, 1);
|
||||
AddIfExists(output, Template.SecuritySectorRangesField, section.SecuritySectorRanges, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Format a ExtrasSection
|
||||
/// Format a CopyProtectionSection
|
||||
/// </summary>
|
||||
internal static void FormatOutputData(StringBuilder output,
|
||||
CopyProtectionSection? section,
|
||||
@@ -476,11 +473,11 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
AddIfExists(output, Template.PlayStationAntiModchipField, section.AntiModchip.LongName(), 1);
|
||||
AddIfExists(output, Template.PlayStationLibCryptField, section.LibCrypt.LongName(), 1);
|
||||
AddIfExists(output, Template.SBIField, section.LibCryptData, 1);
|
||||
AddIfExists(output, Template.LibCryptDataField, section.LibCryptData, 1);
|
||||
}
|
||||
|
||||
AddIfExists(output, Template.ProtectionField, section.Protection, 1);
|
||||
AddIfExists(output, Template.SBIField, section.SecuROMData, 1);
|
||||
AddIfExists(output, Template.SecuROMDataField, section.SecuROMData, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -490,7 +487,7 @@ namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
output.AppendLine("Tracks and Write Offsets:");
|
||||
|
||||
AddIfExists(output, Template.DatField, section.ClrMameProData + "\n", 1);
|
||||
AddIfExists(output, Template.ClrMameProDataField, section.ClrMameProData + "\n", 1);
|
||||
AddIfExists(output, Template.CuesheetField, section.Cuesheet, 1);
|
||||
// TODO: Figure out how to emit raw cuesheet field instead of normal cuesheet
|
||||
var offset = section.OtherWriteOffsets;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Web;
|
||||
using Constants = SabreTools.RedumpLib.Legacy.Data.Constants;
|
||||
using SubmissionInfo = SabreTools.RedumpLib.Legacy.Data.SubmissionInfo;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Tools
|
||||
{
|
||||
|
||||
@@ -9,15 +9,7 @@ using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using SabreTools.RedumpLib.Web;
|
||||
using Constants = SabreTools.RedumpLib.Legacy.Data.Constants;
|
||||
using DiscSubpath = SabreTools.RedumpLib.Legacy.Data.DiscSubpath;
|
||||
using Language = SabreTools.RedumpLib.Legacy.Data.Language;
|
||||
using PackType = SabreTools.RedumpLib.Legacy.Data.PackType;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
using Region = SabreTools.RedumpLib.Legacy.Data.Region;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
@@ -419,7 +411,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
public async Task<List<int>?> CheckSingleDiscsPage(bool? antimodchip = null,
|
||||
bool barcode = false,
|
||||
DiscCategory? category = null,
|
||||
MediaType? discType = null,
|
||||
DiscType? discType = null,
|
||||
string? dumper = null,
|
||||
YesNo? edc = null,
|
||||
string? edition = null,
|
||||
@@ -559,7 +551,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
bool? antimodchip = null,
|
||||
bool barcode = false,
|
||||
DiscCategory? category = null,
|
||||
MediaType? discType = null,
|
||||
DiscType? discType = null,
|
||||
string? dumper = null,
|
||||
YesNo? edc = null,
|
||||
string? edition = null,
|
||||
|
||||
70
SabreTools.RedumpLib.Legacy/Web/CookieWebClient.cs
Normal file
70
SabreTools.RedumpLib.Legacy/Web/CookieWebClient.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
#if NET6_0_OR_GREATER
|
||||
#pragma warning disable SYSLIB0014
|
||||
#endif
|
||||
internal class CookieWebClient : WebClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Last retrieved URL from a web request
|
||||
/// </summary>
|
||||
public Uri? LastUrl { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The timespan to wait before the request times out.
|
||||
/// </summary>
|
||||
public TimeSpan Timeout { get; set; }
|
||||
|
||||
// https://stackoverflow.com/questions/1777221/using-cookiecontainer-with-webclient-class
|
||||
private readonly CookieContainer _container = new();
|
||||
|
||||
/// <summary>
|
||||
/// Get the last downloaded filename, if possible
|
||||
/// </summary>
|
||||
public string? GetLastFilename()
|
||||
{
|
||||
// If the response headers are null or empty
|
||||
if (ResponseHeaders is null || ResponseHeaders.Count == 0)
|
||||
return null;
|
||||
|
||||
// If we don't have the response header we care about
|
||||
string? headerValue = ResponseHeaders.Get("Content-Disposition");
|
||||
if (string.IsNullOrEmpty(headerValue))
|
||||
return null;
|
||||
|
||||
// Extract the filename from the value
|
||||
#if NETCOREAPP || NETSTANDARD2_1_OR_GREATER
|
||||
return headerValue[(headerValue.IndexOf("filename=") + 9)..].Replace("\"", "");
|
||||
#else
|
||||
return headerValue.Substring(headerValue.IndexOf("filename=") + 9).Replace("\"", "");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override WebRequest GetWebRequest(Uri address)
|
||||
{
|
||||
WebRequest request = base.GetWebRequest(address);
|
||||
if (request is HttpWebRequest webRequest)
|
||||
{
|
||||
webRequest.Timeout = (int)Timeout.TotalMilliseconds;
|
||||
webRequest.CookieContainer = _container;
|
||||
}
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override WebResponse GetWebResponse(WebRequest request)
|
||||
{
|
||||
WebResponse response = base.GetWebResponse(request);
|
||||
LastUrl = response.ResponseUri;
|
||||
return response;
|
||||
}
|
||||
}
|
||||
#if NET6_0_OR_GREATER
|
||||
#pragma warning restore SYSLIB0014
|
||||
#endif
|
||||
}
|
||||
21
SabreTools.RedumpLib.Legacy/Web/DelayHelper.cs
Normal file
21
SabreTools.RedumpLib.Legacy/Web/DelayHelper.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class for delaying
|
||||
/// </summary>
|
||||
internal static class DelayHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Delay a random amount of time up to 5 seconds
|
||||
/// </summary>
|
||||
public static void DelayRandom()
|
||||
{
|
||||
var r = new Random();
|
||||
int delay = r.Next(0, 50);
|
||||
Thread.Sleep(delay * 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Web;
|
||||
using DiscSubpath = SabreTools.RedumpLib.Legacy.Data.DiscSubpath;
|
||||
using Language = SabreTools.RedumpLib.Legacy.Data.Language;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
using Region = SabreTools.RedumpLib.Legacy.Data.Region;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
@@ -52,7 +47,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
bool? antimodchip = null,
|
||||
bool barcode = false,
|
||||
DiscCategory? category = null,
|
||||
MediaType? discType = null,
|
||||
DiscType? discType = null,
|
||||
string? dumper = null,
|
||||
YesNo? edc = null,
|
||||
string? edition = null,
|
||||
@@ -221,7 +216,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
bool? antimodchip = null,
|
||||
bool barcode = false,
|
||||
DiscCategory? category = null,
|
||||
MediaType? discType = null,
|
||||
DiscType? discType = null,
|
||||
string? dumper = null,
|
||||
YesNo? edc = null,
|
||||
string? edition = null,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using PackType = SabreTools.RedumpLib.Legacy.Data.PackType;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using DiscSubpath = SabreTools.RedumpLib.Legacy.Data.DiscSubpath;
|
||||
using Language = SabreTools.RedumpLib.Legacy.Data.Language;
|
||||
using PackType = SabreTools.RedumpLib.Legacy.Data.PackType;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
using Region = SabreTools.RedumpLib.Legacy.Data.Region;
|
||||
|
||||
// TODO: Errors should validate number or number range (# or #-#)
|
||||
|
||||
@@ -176,7 +170,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
public static string BuildDiscsUrl(bool? antimodchip = null,
|
||||
bool barcode = false,
|
||||
DiscCategory? category = null,
|
||||
MediaType? discType = null,
|
||||
DiscType? discType = null,
|
||||
string? dumper = null,
|
||||
YesNo? edc = null,
|
||||
string? edition = null,
|
||||
@@ -304,7 +298,6 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
case SortCategory.System:
|
||||
case SortCategory.Version:
|
||||
case SortCategory.Edition:
|
||||
case SortCategory.Language:
|
||||
case SortCategory.Languages:
|
||||
case SortCategory.Serial:
|
||||
case SortCategory.Status:
|
||||
@@ -327,7 +320,7 @@ namespace SabreTools.RedumpLib.Legacy.Web
|
||||
}
|
||||
|
||||
// Status
|
||||
if (status is not null && status >= DumpStatus.UnknownGrey && status <= DumpStatus.VerifiedGreen)
|
||||
if (status is not null && status >= DumpStatus.UnknownGrey && status <= DumpStatus.TwoOrMoreGreen)
|
||||
sb.Append($"status/{(int)status}/");
|
||||
|
||||
// System / Disc Type Search
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using SabreTools.RedumpLib.Web;
|
||||
|
||||
namespace SabreTools.RedumpLib.Legacy.Web
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Data;
|
||||
using SabreTools.RedumpLib.Legacy.Web;
|
||||
using Xunit;
|
||||
using DiscSubpath = SabreTools.RedumpLib.Legacy.Data.DiscSubpath;
|
||||
using PackType = SabreTools.RedumpLib.Legacy.Data.PackType;
|
||||
using PhysicalSystem = SabreTools.RedumpLib.Legacy.Data.PhysicalSystem;
|
||||
|
||||
namespace SabreTools.RedumpLib.Test.RedumpOrg
|
||||
{
|
||||
|
||||
@@ -71,15 +71,12 @@ namespace SabreTools.RedumpLib.Data
|
||||
[HumanReadable(LongName = "Disabled", ShortName = "red")]
|
||||
DisabledRed = 2,
|
||||
|
||||
// Known as "Possible Bad Dump" on redump.org
|
||||
[HumanReadable(LongName = "Questionable", ShortName = "yellow")]
|
||||
QuestionableYellow = 3,
|
||||
|
||||
// Known as "Original Media" on redump.org
|
||||
[HumanReadable(LongName = "Unverified", ShortName = "blue")]
|
||||
UnverifiedBlue = 4,
|
||||
|
||||
// Known as "Two or More" on redump.org
|
||||
[HumanReadable(LongName = "Verified", ShortName = "green")]
|
||||
VerifiedGreen = 5,
|
||||
}
|
||||
@@ -1931,7 +1928,6 @@ namespace SabreTools.RedumpLib.Data
|
||||
/// List of all known systems not bound to specific site limitations
|
||||
/// </summary>
|
||||
/// TODO: Remove marker items
|
||||
/// TODO: Does "Banned" now only mean that things like keys can't be downloaded?
|
||||
public enum PhysicalSystem
|
||||
{
|
||||
#region BIOS Sets
|
||||
@@ -3820,14 +3816,9 @@ namespace SabreTools.RedumpLib.Data
|
||||
[HumanReadable(LongName = "Edition", ShortName = "edition")]
|
||||
Edition,
|
||||
|
||||
/// <remarks>redump.info only</remarks>
|
||||
[HumanReadable(LongName = "Language", ShortName = "language")]
|
||||
Language,
|
||||
|
||||
/// <remarks>redump.org only</remarks>
|
||||
[HumanReadable(LongName = "Languages", ShortName = "languages")]
|
||||
Languages,
|
||||
|
||||
[HumanReadable(LongName = "Serial", ShortName = "serial")]
|
||||
Serial,
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
public const string DiscSerialsField = "Disc Serials";
|
||||
public const string EditionsField = "Editions";
|
||||
public const string BarcodesField = "Barcode";
|
||||
public const string BarcodesField = "Barcodes";
|
||||
public const string VersionField = "Version";
|
||||
public const string ErrorCountField = "Error Count";
|
||||
public const string EXEDate = "EXE Date";
|
||||
@@ -108,13 +108,5 @@
|
||||
public const string DiscNotDetected = "Disc Not Detected";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Redump.org only
|
||||
|
||||
public const string PlayStationAntiModchipField = "Anti-modchip";
|
||||
public const string PlaystationLanguageSelectionViaField = "Language Selection Via";
|
||||
public const string PlayStationLibCryptField = "LibCrypt";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="SabreTools.RedumpLib.Legacy" />
|
||||
<InternalsVisibleTo Include="SabreTools.RedumpLib.Test" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user