Beispiel #1
0
        public string GetFriendlyTitle(TitleIndices index = TitleIndices.EnglishIndex)
        {
            string title = GetTitleAsNullIfDefault(index);

            return(title != null
                                ? string.Join(' ', title.Split('\n').Select(l => l.Trim(' ', '\0')).ToArray())
                                : null);
        }
Beispiel #2
0
        public string GetTitleOnly(TitleIndices index = TitleIndices.EnglishIndex)
        {
            string title = GetTitleAsNullIfDefault(index);

            if (title == null)
            {
                return(null);
            }
            string[] titleParts = title.Split('\n');
            return(string.Join(' ', titleParts
                               .Take(titleParts.Length > 1 ? titleParts.Length - 1 : titleParts.Length)
                               .Select(l => l.Trim(' ', '\0'))
                               .ToArray()));
        }
Beispiel #3
0
 public string GetProperName(bool withGameCode = false, TitleIndices index = TitleIndices.EnglishIndex)
 {
     if (withGameCode)
     {
         if (Titles[(int)index] != null)
         {
             return($"{GameCode} - {GameTitle} - {GetFriendlyTitle(index)}");
         }
         if (GameTitle != null)
         {
             return($"{GameCode} - {GameTitle}");
         }
         return(GameCode);
     }
     if (Titles[(int)index] != null)
     {
         return($"{GameTitle} - {GetFriendlyTitle(index)}");
     }
     return(GameTitle);
 }
Beispiel #4
0
 internal static Language.LanguageCodes TitleIndexToLanguageCode(TitleIndices index)
 => index switch
 {
Beispiel #5
0
 internal string GetTitle(TitleIndices index = TitleIndices.EnglishIndex)
 => Titles[(int)index];
Beispiel #6
0
 internal string GetTitleAsNullIfDefault(TitleIndices index = TitleIndices.EnglishIndex)
 => !string.Equals(Titles[(int)index], DefaultTitle, StringComparison.InvariantCultureIgnoreCase) ? Titles[(int)index] : null;