public override RpcResult DidSaveTextDocument(DidSaveTextDocumentParams args) { return(RpcResult.Error(new ResponseError { code = (int)ErrorCodes.RequestFailed, message = "Not supported" })); }
/** * The result type LocationLink[] got introduced with version 3.14.0 * and depends on the corresponding client capability textDocument.implementation.linkSupport. */ public override RpcResult GotoImplementation(ImplementationParams args) { return(RpcResult.Error(new ResponseError { code = (int)ErrorCodes.RequestFailed, message = "Not supported" })); }
private RpcResult CallRpcMethod(string name, JToken @params) { if (double.TryParse(name, out _)) { return(RpcResult.Error(new ResponseError { code = (int)ErrorCodes.InvalidRequest, message = "" })); } foreach (var service in services) { foreach (var method in service.GetType().GetMethods()) { if (IsAllowedToInvoke(method, name)) { object[] args = null; var pms = method.GetParameters(); if (pms.Length > 0) { try { args = new[] { @params.ToObject(pms[0].ParameterType) }; } #if BHLSP_DEBUG catch (Exception e) { BHLSPLogger.WriteLine(e); #else catch { #endif return(RpcResult.Error(new ResponseError { code = (int)ErrorCodes.InvalidParams, message = "" })); } } return((RpcResult)method.Invoke(service, args)); } } } return(RpcResult.Error(new ResponseError { code = (int)ErrorCodes.MethodNotFound, message = "Method not found" })); }