6 instantiations of ImageElement
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\Extensions.cs (1)
300
=>
new
(element.Glyph.ToLSPImageId());
Handler\Completion\CompletionResultFactory.cs (1)
372
Icon = new
ImageElement
(item.Tags.GetFirstGlyph().ToLSPImageId()),
Handler\References\FindUsagesLSPContext.cs (1)
218
DefinitionIcon = new
ImageElement
(definitionGlyph.ToLSPImageId()),
Protocol\Internal\Converters\ImageElementConverter.cs (2)
28
return automationName is null ? new
ImageElement
(imageId.Value) : new
ImageElement
(imageId.Value, automationName);
Protocol\Internal\Text\ImageElement.cs (1)
14
public static readonly ImageElement Empty =
new
(default, string.Empty);
25 references to ImageElement
Microsoft.CodeAnalysis.LanguageServer.Protocol (25)
Extensions\Extensions.cs (1)
299
public static
ImageElement
ToLSPElement(this QuickInfoGlyphElement element)
Protocol\Internal\Converters\ImageElementConverter.cs (10)
12
internal class ImageElementConverter : JsonConverter<
ImageElement
>
16
public override
ImageElement
Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
37
case nameof(
ImageElement
.ImageId):
40
case nameof(
ImageElement
.AutomationName):
44
if (reader.GetString() != nameof(
ImageElement
))
45
throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(
ImageElement
)}");
58
public override void Write(Utf8JsonWriter writer,
ImageElement
value, JsonSerializerOptions options)
61
writer.WritePropertyName(nameof(
ImageElement
.ImageId));
63
writer.WriteString(nameof(
ImageElement
.AutomationName), value.AutomationName);
64
writer.WriteString(ObjectContentConverter.TypeProperty, nameof(
ImageElement
));
Protocol\Internal\Converters\ObjectContentConverter.cs (5)
19
/// <item><description><see cref="
ImageElement
"/></description></item>,
56
case nameof(
ImageElement
):
57
return ImageElementConverter.Instance.Read(ref clonedReader, typeof(
ImageElement
), options);
96
case
ImageElement
:
97
ImageElementConverter.Instance.Write(writer, (
ImageElement
)value, options);
Protocol\Internal\Text\ImageElement.cs (1)
14
public static readonly
ImageElement
Empty = new(default, string.Empty);
Protocol\Internal\VSInternalCompletionItem.cs (1)
26
public
ImageElement
? Icon { get; set; }
Protocol\Internal\VSInternalLocation.cs (2)
19
/// Gets or sets the text value for a location reference. Must be of type <see cref="
ImageElement
"/> or <see cref="ContainerElement"/> or <see cref="ClassifiedTextElement"/> or <see cref="string"/>.
33
if (value is
ImageElement
|| value is ContainerElement || value is ClassifiedTextElement || value is string)
Protocol\Internal\VSInternalReferenceItem.cs (5)
53
/// Must be of type <see cref="string"/>, <see cref="ClassifiedTextElement"/>, <see cref="ContainerElement"/> and <see cref="
ImageElement
"/>.
72
(value is
ImageElement
|| value is ContainerElement || value is ClassifiedTextElement || value is string))
133
/// Must be of type <see cref="
ImageElement
"/> or <see cref="ContainerElement"/> or <see cref="ClassifiedTextElement"/> or <see cref="string"/>.
160
if (value is
ImageElement
|| value is ContainerElement || value is ClassifiedTextElement || value is string)
192
public
ImageElement
? DefinitionIcon { get; set; }