Balakin.VSOutputEnhancer.StyleManager.LoadColorsFromResources C# (CSharp) Method

LoadColorsFromResources() private method

private LoadColorsFromResources ( ) : FormatDefinitionStyle>.IDictionary
return FormatDefinitionStyle>.IDictionary
        private IDictionary<String, FormatDefinitionStyle> LoadColorsFromResources()
        {
            var theme = environmentService.GetTheme();
            var file = Path.Combine(Utils.GetExtensionRootPath(), "Resources", theme + "Theme.json");
            if (File.Exists(file)) {
                var content = File.ReadAllText(file);
                try {
                    return JsonConvert.DeserializeObject<Dictionary<String, FormatDefinitionStyle>>(content);
                } catch (JsonSerializationException) {
                }
            }
            return new Dictionary<String, FormatDefinitionStyle>();
        }