Exemple #1
0
        public static string GetClassificationTypeName(ProbeClassifierType type, string defaultValue = null)
        {
            var ct = GetClassificationType(type);

            if (ct == null)
            {
                return(defaultValue);
            }
            return(ct.Classification);
        }
Exemple #2
0
        public static IClassificationType GetClassificationType(ProbeClassifierType type)
        {
            if (VSTheme.CurrentTheme == VSThemeMode.Light)
            {
                if (_lightTokenTypes != null && _lightTokenTypes.TryGetValue(type, out IClassificationType classificationType))
                {
                    return(classificationType);
                }
            }
            else
            {
                if (_darkTokenTypes != null && _darkTokenTypes.TryGetValue(type, out IClassificationType classificationType))
                {
                    return(classificationType);
                }
            }

            return(null);
        }
 public ProbeClassifiedString(ProbeClassifierType type, string text)
 {
     _runs = new ProbeClassifiedRun[] { new ProbeClassifiedRun(type, text) };
 }
 public ProbeClassifiedRun(ProbeClassifierType type, string text)
 {
     Type = type;
     Text = text;
 }
 public void Add(ProbeClassifierType type, string text)
 {
     _runs.Add(new ProbeClassifiedRun(type, text));
 }