refactor: removed keyvaluepairs for various values

This commit is contained in:
Michael Green
2023-02-21 21:57:34 +11:00
parent cb44f1a509
commit fef758c32c
2 changed files with 14 additions and 14 deletions

View File

@@ -316,19 +316,19 @@ namespace gaseous_identifier.classes
// check for country
if (TOSECCountry.ContainsKey(token))
{
gameObject.Country = new KeyValuePair<string, string>(token, TOSECCountry[token]);
gameObject.Country = token;
}
// check for language
if (TOSECLanguage.ContainsKey(token))
{
gameObject.Language = new KeyValuePair<string, string>(token, TOSECLanguage[token]);
gameObject.Language = token;
}
// check for copyright
if (TOSECCopyright.ContainsKey(token))
{
gameObject.Copyright = new KeyValuePair<string, string>(token, TOSECCopyright[token]);
gameObject.Copyright = token;
}
}
}
@@ -365,7 +365,7 @@ namespace gaseous_identifier.classes
// check for copyright
if (TOSECDevelopment.ContainsKey(token))
{
romObject.DevelopmentStatus = new KeyValuePair<string, string>(token, TOSECDevelopment[token]);
romObject.DevelopmentStatus = token;
}
// check for media type
@@ -409,10 +409,10 @@ namespace gaseous_identifier.classes
token != gameObject.Publisher &&
token != gameObject.SystemVariant &&
token != gameObject.Video &&
token != gameObject.Country.Key &&
token != gameObject.Copyright.Key &&
token != gameObject.Language.Key &&
token != romObject.DevelopmentStatus.Key
token != gameObject.Country &&
token != gameObject.Copyright &&
token != gameObject.Language &&
token != romObject.DevelopmentStatus
)
)
{
@@ -482,8 +482,8 @@ namespace gaseous_identifier.classes
if (existingGame.Name == gameObject.Name &&
existingGame.Year == gameObject.Year &&
existingGame.Publisher == gameObject.Publisher &&
existingGame.Country.Key == gameObject.Country.Key &&
existingGame.Language.Key == gameObject.Language.Key)
existingGame.Country == gameObject.Country &&
existingGame.Language == gameObject.Language)
{
existingGame.Roms.AddRange(gameObject.Roms);
existingGameFound = true;

View File

@@ -34,9 +34,9 @@ namespace gaseous_identifier.objects
public string? System { get; set; }
public string? SystemVariant { get; set; }
public string? Video { get; set; }
public KeyValuePair<string, string> Country { get; set; }
public KeyValuePair<string, string> Language { get; set; }
public KeyValuePair<string, string> Copyright { get; set; }
public string? Country { get; set; }
public string? Language { get; set; }
public string? Copyright { get; set; }
public List<Rom> Roms { get; set; } = new List<Rom>();
public enum DemoTypes
@@ -57,7 +57,7 @@ namespace gaseous_identifier.objects
public string? Md5 { get; set; }
public string? Sha1 { get; set; }
public KeyValuePair<string, string> DevelopmentStatus { get; set; }
public string? DevelopmentStatus { get; set; }
public List<string> flags { get; set; } = new List<string>();