Пример #1
0
        public string GetSessionName(Game.ResultSession parsedData)
        {
            if (string.Equals(parsedData.Name, "RSR hotlap", StringComparison.OrdinalIgnoreCase) || parsedData.Name == AppStrings.Rsr_SessionName)
            {
                return(AppStrings.Rsr_SessionName);
            }

            return(null);
        }
Пример #2
0
        public static string GetSessionName(this Game.ResultSession parsedData)
        {
            if (parsedData == null)
            {
                return(null);
            }

            var provided = _nameProviders.Select(x => x.GetSessionName(parsedData)).NonNull().FirstOrDefault();

            if (provided != null)
            {
                return(provided);
            }

            if (parsedData.Name == Game.TrackDaySessionName)
            {
                return(ToolsStrings.Session_TrackDay);
            }

            return(parsedData.Type.GetDisplayName() ?? LocalizeSessionName(parsedData.Name));
        }
Пример #3
0
 internal CommonSessionResult(Game.ResultSession parsedData)
 {
     DisplayName = parsedData.GetSessionName();
 }
Пример #4
0
 internal CommonSessionResult(Game.ResultSession parsedData)
 {
     DisplayName = parsedData.Type.GetDisplayName() ?? parsedData.Name.ApartFromLast(@" Session", StringComparison.OrdinalIgnoreCase);
 }