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