Exemplo n.º 1
0
        public CodeIssuesModule(CodeIssuesHandler codeIssuesHandler)
        {
            Post["GetCodeIssues", "/getcodeissues"] = x =>
                {
                    var req = this.Bind<Request>();
                    var res = codeIssuesHandler.GetCodeIssues(req);
                    return Response.AsJson(res);
                };

            Post["FixCodeIssue", "/fixcodeissue"] = x =>
            {
                var req = this.Bind<RunCodeActionRequest>();
                var res = codeIssuesHandler.FixCodeIssue(req);
                return Response.AsJson(res);
            };
        }
Exemplo n.º 2
0
        public CodeIssuesModule(CodeIssuesHandler codeIssuesHandler)
        {
            Post["/getcodeissues"] = x =>
            {
                var req = this.Bind <Request>();
                var res = codeIssuesHandler.GetCodeIssues(req);
                return(Response.AsJson(res));
            };

            Post["/fixcodeissue"] = x =>
            {
                var req = this.Bind <RunCodeActionRequest>();
                var res = codeIssuesHandler.FixCodeIssue(req);
                return(Response.AsJson(res));
            };
        }
Exemplo n.º 3
0
 public CodeCheckHandler(SyntaxErrorsHandler syntaxErrorsHandler, CodeIssuesHandler codeIssuesHandler, SemanticErrorsHandler semanticErrorsHandler)
 {
     _semanticErrorsHandler = semanticErrorsHandler;
     _codeIssuesHandler = codeIssuesHandler;
     _syntaxErrorsHandler = syntaxErrorsHandler;
 }