TryToDetectWeatherTypeById() private static method

private static TryToDetectWeatherTypeById ( string id ) : WeatherType
id string
return WeatherType
            public bool WeatherIcon(Table v)
            {
                var icons = _data?.GetKeys(GetText(v, "icons") ?? "").ToList();

                if (icons == null || icons.Count == 0)
                {
                    Logging.Warning($"Icons not found: {GetText(v, "icons")}");
                    return(false);
                }

                if (_texturesContext.Weather == null)
                {
                    return(false);
                }

                var weatherType = _texturesContext.Weather.Type;

                if (weatherType == WeatherType.None)
                {
                    weatherType = WeatherObject.TryToDetectWeatherTypeById(_texturesContext.Weather.Id);
                }

                var availableTypes = icons.Select(x => new {
                    Type     = Enum.TryParse <WeatherType>(Regex.Replace(x, @"^.*/|\.\w+$|\W", ""), true, out var type) ? type : WeatherType.None,
                    FileName = x
                }).ToList();