1 instantiation of TypeRef
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.cs (1)
92return s_cache.GetOrAdd(key, new TypeRef(typeName, assemblyName, codeBase));
56 references to TypeRef
Microsoft.CodeAnalysis.LanguageServer.Protocol (56)
Handler\WorkspaceCommand\ExecuteWorkspaceCommandHandler.cs (2)
37var handler = (AbstractExecuteWorkspaceCommandHandler)handlerProvider.GetMethodHandler(requestMethod, TypeRef.FromOrNull(typeof(ExecuteCommandParams)), TypeRef.FromOrNull(typeof(object)), LanguageServerConstants.DefaultLanguageName);
LspServices\AbstractExportLspServiceAttribute.cs (2)
99void AddTypeRef(TypeRef? typeRef) 101if (typeRef is TypeRef t)
LspServices\LspServiceMetadataView.cs (7)
16public TypeRef TypeRef { get; } 33TypeRef = TypeRef.From(typeName, assemblyName, codeBase); 52var requestTypeRef = ReadTypeRef(methodHandlerData, ref index); 53var responseTypeRef = ReadTypeRef(methodHandlerData, ref index); 54var requestContextTypeRef = ReadTypeRef(methodHandlerData, ref index); 72static TypeRef? ReadTypeRef(string?[] methodHandlerData, ref int index) 86return TypeRef.From(typeName, assemblyName, codeBase);
LspServices\LspServices.cs (3)
170public ImmutableArray<(IMethodHandler? Instance, TypeRef HandlerTypeRef, ImmutableArray<MethodHandlerDetails> HandlerDetails)> GetMethodHandlers() 172using var _ = ArrayBuilder<(IMethodHandler?, TypeRef, ImmutableArray<MethodHandlerDetails>)>.GetInstance(out var builder); 180builder.Add((handler, TypeRef.From(handlerType), methods));
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractHandlerProvider.cs (4)
27/// <param name="requestTypeRef">A <see cref="TypeRef"/> representing the request type for this method.</param> 28/// <param name="responseTypeRef">A <see cref="TypeRef"/> representing the response type for this method.</param> 35public abstract IMethodHandler GetMethodHandler(string method, TypeRef? requestTypeRef, TypeRef? responseTypeRef, string language);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (2)
64TypeRefResolver = typeRefResolver ?? TypeRef.DefaultResolver.Instance; 139static bool AllTypesMatch(IEnumerable<TypeRef?> typeRefs)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractTypeRefResolver.cs (3)
15private readonly ConcurrentDictionary<TypeRef, Type?> _typeRefToTypeMap = []; 17public Type? Resolve(TypeRef typeRef) 28protected abstract Type? ResolveCore(TypeRef typeRef);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (5)
23public IMethodHandler GetMethodHandler(string method, TypeRef? requestTypeRef, TypeRef? responseTypeRef) 26public override IMethodHandler GetMethodHandler(string method, TypeRef? requestTypeRef, TypeRef? responseTypeRef, string language) 103static Lazy<IMethodHandler> GetLazyHandlerFromTypeRef(ILspServices lspServices, AbstractTypeRefResolver typeRefResolver, TypeRef handlerTypeRef)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IMethodHandlerProvider.cs (1)
18ImmutableArray<(IMethodHandler? Instance, TypeRef HandlerTypeRef, ImmutableArray<MethodHandlerDetails> HandlerDetails)> GetMethodHandlers();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (9)
21/// <param name="RequestTypeRef">A <see cref="TypeRef"/> representing the request type, if any.</param> 22/// <param name="ResponseTypeRef">A <see cref="TypeRef"/> representing the response type, if any.</param> 23/// <param name="RequestContextTypeRef">A <see cref="TypeRef"/> representing the context type.</param> 27TypeRef? RequestTypeRef, 28TypeRef? ResponseTypeRef, 29TypeRef RequestContextTypeRef) 45TypeRef.FromOrNull(requestType), 46TypeRef.FromOrNull(responseType), 47TypeRef.From(requestContextType)));
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (1)
30var requestTypeRef = metadata.RequestTypeRef;
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
110var requestType = metadata.RequestTypeRef is TypeRef requestTypeRef 113var responseType = metadata.ResponseTypeRef is TypeRef responseTypeRef
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestHandlerMetadata.cs (2)
10internal record RequestHandlerMetadata(string MethodName, TypeRef? RequestTypeRef, TypeRef? ResponseTypeRef, string Language)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.cs (12)
16internal sealed partial class TypeRef : IEquatable<TypeRef> 18private static readonly ConcurrentDictionary<(string TypeName, string AssemblyName, string? CodeBase), TypeRef> s_cache = []; 51=> Equals(obj as TypeRef); 53public bool Equals(TypeRef? other) 78/// Constructs a <see cref="TypeRef"/> instance. 83public static TypeRef From(string typeName, string assemblyName, string? codeBase) 87if (s_cache.TryGetValue(key, out var result)) 96/// Constructs a <see cref="TypeRef"/> from a <see cref="Type"/>. 99public static TypeRef From(Type type) 117/// Constructs a <see cref="TypeRef"/> from a <see cref="Type"/> or returns <see langword="null"/> 120public static TypeRef? FromOrNull(Type? type) 123public static TypeRef Of<T>() => From(typeof(T));
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.DefaultResolver.cs (1)
22protected override Type? ResolveCore(TypeRef typeRef)