1 instantiation of ImageId
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\Internal\Converters\ImageIdConverter.cs (1)
28return new ImageId(new Guid(guid), id);
33 references to ImageId
Microsoft.CodeAnalysis.LanguageServer.Protocol (33)
Protocol\Internal\Converters\ImageElementConverter.cs (2)
20ImageId? imageId = null; 38imageId = ImageIdConverter.Instance.Read(ref reader, typeof(ImageId), options);
Protocol\Internal\Converters\ImageIdConverter.cs (10)
11internal class ImageIdConverter : JsonConverter<ImageId> 15public override ImageId Read(ref Utf8JsonReader reader, Type objectType, JsonSerializerOptions options) 21if (root.TryGetProperty(ObjectContentConverter.TypeProperty, out var typeProperty) && typeProperty.GetString() != nameof(ImageId)) 23throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ImageId)}"); 26var guid = root.GetProperty(nameof(ImageId.Guid)).GetString() ?? throw new JsonException(); 27var id = root.GetProperty(nameof(ImageId.Id)).GetInt32(); 36public override void Write(Utf8JsonWriter writer, ImageId value, JsonSerializerOptions options) 39writer.WriteString(nameof(ImageId.Guid), value.Guid.ToString()); 40writer.WriteNumber(nameof(ImageId.Id), value.Id); 41writer.WriteString(ObjectContentConverter.TypeProperty, nameof(ImageId));
Protocol\Internal\Converters\ObjectContentConverter.cs (5)
18/// <item><description><see cref="ImageId"/></description></item>, 54case nameof(ImageId): 55return ImageIdConverter.Instance.Read(ref clonedReader, typeof(ImageId), options); 93case ImageId: 94ImageIdConverter.Instance.Write(writer, (ImageId)value, options);
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (2)
17private static readonly ConcurrentDictionary<ImageId, string> IconRawJson = new ConcurrentDictionary<ImageId, string>();
Protocol\Internal\Text\ImageElement.cs (3)
16public ImageId ImageId { get; } 19public ImageElement(ImageId imageId) : this(imageId, null) 24public ImageElement(ImageId imageId, string? automationName)
Protocol\Internal\Text\ImageId.cs (11)
21internal struct ImageId : IEquatable<ImageId> 66bool IEquatable<ImageId>.Equals(ImageId other) 80if (other is ImageId) 82var other2 = (ImageId)other; 83return ((IEquatable<ImageId>)this).Equals(other2); 89public static bool operator ==(ImageId left, ImageId right) 94public static bool operator !=(ImageId left, ImageId right)