コード例 #1
0
            private static async Task <Response> HandleCodeCompletionRequest(CodeCompletionRequest request)
            {
                var response = new CodeCompletionResponse {
                    Kind = request.Kind, ScriptFile = request.ScriptFile
                };

                response.Suggestions = await Task.Run(() => Internal.CodeCompletionRequest(response.Kind, response.ScriptFile));

                return(response);
            }
コード例 #2
0
ファイル: MessagingServer.cs プロジェクト: Gamemap/godot-1
            private static async Task <Response> HandleCodeCompletionRequest(CodeCompletionRequest request)
            {
                // This is needed if the "resource path" part of the path is case insensitive.
                // However, it doesn't fix resource loading if the rest of the path is also case insensitive.
                string scriptFileLocalized = FsPathUtils.LocalizePathWithCaseChecked(request.ScriptFile);

                var response = new CodeCompletionResponse {
                    Kind = request.Kind, ScriptFile = request.ScriptFile
                };

                response.Suggestions = await Task.Run(() =>
                                                      Internal.CodeCompletionRequest(response.Kind, scriptFileLocalized ?? request.ScriptFile));

                return(response);
            }