34 references to ClassifiedTextRun
Microsoft.CodeAnalysis.LanguageServer.Protocol (34)
Extensions\Extensions.cs (1)
302
public static
ClassifiedTextRun
ToLSPRun(this QuickInfoClassifiedTextRun run)
Handler\References\FindUsagesLSPContext.cs (2)
321
private static
ClassifiedTextRun
[] GetClassifiedTextRuns(
329
using var _ = ArrayBuilder<
ClassifiedTextRun
>.GetInstance(out var classifiedTextRuns);
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (3)
18
List<
ClassifiedTextRun
> objects = new();
39
objects.Add(ClassifiedTextRunConverter.Instance.Read(ref reader, typeof(
ClassifiedTextRun
), options)!);
62
foreach (
var
run in value.Runs)
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (16)
11
internal class ClassifiedTextRunConverter : JsonConverter<
ClassifiedTextRun
>
15
public override
ClassifiedTextRun
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
20
if (data.TryGetProperty(ObjectContentConverter.TypeProperty, out var typeProperty) && typeProperty.GetString() != nameof(
ClassifiedTextRun
))
22
throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(
ClassifiedTextRun
)}");
25
var classificationTypeName = data.GetProperty(nameof(
ClassifiedTextRun
.ClassificationTypeName)).GetString();
26
var text = data.GetProperty(nameof(
ClassifiedTextRun
.Text)).GetString();
27
var markerTagType = data.GetProperty(nameof(
ClassifiedTextRun
.MarkerTagType)).GetString();
28
var style = (ClassifiedTextRunStyle)(data.GetProperty(nameof(
ClassifiedTextRun
.Style)).GetInt32());
37
public override void Write(Utf8JsonWriter writer,
ClassifiedTextRun
value, JsonSerializerOptions options)
40
writer.WriteString(nameof(
ClassifiedTextRun
.ClassificationTypeName), value.ClassificationTypeName);
41
writer.WriteString(nameof(
ClassifiedTextRun
.Text), value.Text);
42
writer.WriteString(nameof(
ClassifiedTextRun
.MarkerTagType), value.MarkerTagType);
43
writer.WriteNumber(nameof(
ClassifiedTextRun
.Style), (int)value.Style);
44
writer.WriteNull(nameof(
ClassifiedTextRun
.Tooltip));
50
writer.WriteNull(nameof(
ClassifiedTextRun
.NavigationAction));
56
writer.WriteString(ObjectContentConverter.TypeProperty, nameof(
ClassifiedTextRun
));
Protocol\Internal\Converters\ObjectContentConverter.cs (4)
22
/// <item><description><see cref="
ClassifiedTextRun
"/></description></item>.
62
case nameof(
ClassifiedTextRun
):
105
case
ClassifiedTextRun
:
106
ClassifiedTextRunConverter.Instance.Write(writer, (
ClassifiedTextRun
)value, options);
Protocol\Internal\Text\ClassifiedTextElement.cs (3)
18
public IEnumerable<
ClassifiedTextRun
> Runs { get; }
20
public ClassifiedTextElement(params
ClassifiedTextRun
[] runs)
25
public 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: