public IEditorFormatMap GetEditorFormatMap(string category) {
			if (category == null)
				throw new ArgumentNullException(nameof(category));
			var textAppearanceCategory = textAppearanceCategoryService.GetSettings(category);
			IEditorFormatMap map;
			if (toCategoryMap.TryGetValue(textAppearanceCategory, out map))
				return map;
			map = new CategoryEditorFormatMap(dispatcher, editorFormatDefinitionService);
			var updater = new CategoryEditorFormatMapUpdater(themeService, textAppearanceCategory, editorFormatDefinitionService, map);
			cachedUpdaters.Add(updater);
			toCategoryMap.Add(textAppearanceCategory, map);
			return map;
		}
        public IEditorFormatMap GetEditorFormatMap(string category)
        {
            if (category is null)
            {
                throw new ArgumentNullException(nameof(category));
            }
            var textAppearanceCategory = textAppearanceCategoryService.GetSettings(category);

            if (toCategoryMap.TryGetValue(textAppearanceCategory, out var map))
            {
                return(map);
            }
            map = new CategoryEditorFormatMap(dispatcher, editorFormatDefinitionService);
            var updater = new CategoryEditorFormatMapUpdater(themeService, textAppearanceCategory, editorFormatDefinitionService, map);

            cachedUpdaters.Add(updater);
            toCategoryMap.Add(textAppearanceCategory, map);
            return(map);
        }
示例#3
0
        public IEditorFormatMap GetEditorFormatMap(string category)
        {
            if (category == null)
            {
                throw new ArgumentNullException(nameof(category));
            }
            var textEditorFontSettings = textEditorFontSettingsService.GetSettings(category);
            IEditorFormatMap map;

            if (toCategoryMap.TryGetValue(textEditorFontSettings, out map))
            {
                return(map);
            }
            map = new CategoryEditorFormatMap(dispatcher, editorFormatDefinitionService);
            var updater = new CategoryEditorFormatMapUpdater(themeManager, textEditorFontSettings, editorFormatDefinitionService, map);

            cachedUpdaters.Add(updater);
            toCategoryMap.Add(textEditorFontSettings, map);
            return(map);
        }