34 references to ClassifiedTextRun
Microsoft.CodeAnalysis.LanguageServer.Protocol (34)
Extensions\Extensions.cs (1)
302public static ClassifiedTextRun ToLSPRun(this QuickInfoClassifiedTextRun run)
Handler\References\FindUsagesLSPContext.cs (2)
321private static ClassifiedTextRun[] GetClassifiedTextRuns( 329using var _ = ArrayBuilder<ClassifiedTextRun>.GetInstance(out var classifiedTextRuns);
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (3)
18List<ClassifiedTextRun> objects = new(); 39objects.Add(ClassifiedTextRunConverter.Instance.Read(ref reader, typeof(ClassifiedTextRun), options)!); 62foreach (var run in value.Runs)
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (16)
11internal class ClassifiedTextRunConverter : JsonConverter<ClassifiedTextRun> 15public override ClassifiedTextRun? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20if (data.TryGetProperty(ObjectContentConverter.TypeProperty, out var typeProperty) && typeProperty.GetString() != nameof(ClassifiedTextRun)) 22throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextRun)}"); 25var classificationTypeName = data.GetProperty(nameof(ClassifiedTextRun.ClassificationTypeName)).GetString(); 26var text = data.GetProperty(nameof(ClassifiedTextRun.Text)).GetString(); 27var markerTagType = data.GetProperty(nameof(ClassifiedTextRun.MarkerTagType)).GetString(); 28var style = (ClassifiedTextRunStyle)(data.GetProperty(nameof(ClassifiedTextRun.Style)).GetInt32()); 37public override void Write(Utf8JsonWriter writer, ClassifiedTextRun value, JsonSerializerOptions options) 40writer.WriteString(nameof(ClassifiedTextRun.ClassificationTypeName), value.ClassificationTypeName); 41writer.WriteString(nameof(ClassifiedTextRun.Text), value.Text); 42writer.WriteString(nameof(ClassifiedTextRun.MarkerTagType), value.MarkerTagType); 43writer.WriteNumber(nameof(ClassifiedTextRun.Style), (int)value.Style); 44writer.WriteNull(nameof(ClassifiedTextRun.Tooltip)); 50writer.WriteNull(nameof(ClassifiedTextRun.NavigationAction)); 56writer.WriteString(ObjectContentConverter.TypeProperty, nameof(ClassifiedTextRun));
Protocol\Internal\Converters\ObjectContentConverter.cs (4)
22/// <item><description><see cref="ClassifiedTextRun"/></description></item>. 62case nameof(ClassifiedTextRun): 105case ClassifiedTextRun: 106ClassifiedTextRunConverter.Instance.Write(writer, (ClassifiedTextRun)value, options);
Protocol\Internal\Text\ClassifiedTextElement.cs (3)
18public IEnumerable<ClassifiedTextRun> Runs { get; } 20public ClassifiedTextElement(params ClassifiedTextRun[] runs) 25public ClassifiedTextElement(IEnumerable<ClassifiedTextRun> runs)
Protocol\Internal\VSInternalReferenceItem.cs (5)
56/// This element should colorize syntax, but should not contain highlighting, e.g. <see cref="ClassifiedTextRun"/> 57/// embedded within <see cref="ClassifiedTextElement"/> should not define <see cref="ClassifiedTextRun.MarkerTagType"/>. 138/// Highlighting can be achieved by setting <see cref="ClassifiedTextRun.MarkerTagType"/> 139/// on <see cref="ClassifiedTextRun"/> embedded within <see cref="ClassifiedTextElement"/>. 142/// Encouraged values for <see cref="ClassifiedTextRun.MarkerTagType"/> are: