You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix invalid cast issue in omnisharp-roslyn by fixing LspHandlerDescriptor .ctor
The issue (apparently) is that LspHandlerDescriptor is constructed for
DelegatingRequest that is registered in LanguageServerHost.cs (in
omnisharp-roslyn) via .OnRequest().
The constructor attempts to resolve RPC return type based on what
generic type is set on IRequest<T> that inherits DelegatingRequest.
However DelegatingRequest implements both IRequest and
IRequest<TResponse> and .LINQ query selects IRequest<MediatR.Unit> type
as the return value -- while it should be IRequest<JToken>.
Fixed by ordering implemented IRequest<> interfaces by generic param
type and taking the first that is not MediatR.Unit -- only then use the
MediatR.Unit version.
0 commit comments