public InformationQuickInfoContentVM(InformationQuickInfoContent content, IRoslynGlyphService roslynGlyphService, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) { if (content == null) { throw new ArgumentNullException(nameof(content)); } if (roslynGlyphService == null) { throw new ArgumentNullException(nameof(roslynGlyphService)); } if (classificationFormatMap == null) { throw new ArgumentNullException(nameof(classificationFormatMap)); } if (themeClassificationTypeService == null) { throw new ArgumentNullException(nameof(themeClassificationTypeService)); } var sb = new StringBuilder(); if (content.SymbolGlyph != null) { SymbolImageSource = roslynGlyphService.GetImage(content.SymbolGlyph.Value, BackgroundType.QuickInfo); } if (content.WarningGlyph != null) { WarningImageSource = roslynGlyphService.GetImage(content.WarningGlyph.Value, BackgroundType.QuickInfo); } MainDescriptionObject = TryCreateObject(sb, content.MainDescription, classificationFormatMap, themeClassificationTypeService); DocumentationObject = TryCreateObject(sb, content.Documentation, classificationFormatMap, themeClassificationTypeService); UsageObject = TryCreateObject(sb, content.UsageText, classificationFormatMap, themeClassificationTypeService); TypeParameterMapObject = TryCreateObject(sb, content.TypeParameterMap, classificationFormatMap, themeClassificationTypeService); AnonymousTypesObject = TryCreateObject(sb, content.AnonymousTypes, classificationFormatMap, themeClassificationTypeService); ExceptionObject = TryCreateObject(sb, content.ExceptionText, classificationFormatMap, themeClassificationTypeService); }
public QuickInfoContentCreator(IRoslynGlyphService roslynGlyphService, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) { if (roslynGlyphService == null) { throw new ArgumentNullException(nameof(roslynGlyphService)); } if (classificationFormatMap == null) { throw new ArgumentNullException(nameof(classificationFormatMap)); } if (themeClassificationTypeService == null) { throw new ArgumentNullException(nameof(themeClassificationTypeService)); } this.roslynGlyphService = roslynGlyphService; this.classificationFormatMap = classificationFormatMap; this.themeClassificationTypeService = themeClassificationTypeService; }
QuickInfoContentCreatorProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, IRoslynGlyphService roslynGlyphService) { this.classificationFormatMapService = classificationFormatMapService; this.themeClassificationTypeService = themeClassificationTypeService; this.roslynGlyphService = roslynGlyphService; }