Ejemplo n.º 1
0
 public Judger(FileFactory factory, Problem problem, Submit submit)
 {
     _factory = factory;
     _problem = problem;
     _options = problem.Options;
     _submit  = submit;
     _checker = JudgeProcess.ApprKernel.Get <IChecker>();
 }
Ejemplo n.º 2
0
        public void Create(string languageName, FileFactory factory, string sourceCode)
        {
            Compiler compiler = _service.GetCompilerByName(languageName);


            if (compiler.Type == LanguageType.сompiler)
            {
                Path = factory.CreateFileAndGetFileName(sourceCode);
                compiler.UpdateCommand(Path, Path);
                CompilationResult = compiler.Compile();
            }
            else
            {
                Path              = compiler.GetPath();
                StartArgument     = factory.CreateFileAndGetFileName(sourceCode);
                CompilationResult = new CompilationResult(0, "INTERPRETER");
            }
        }
Ejemplo n.º 3
0
 public JudgeProcess(string root)
 {
     _root       = root;
     _factory    = new FileFactory(_root);
     _logUpdater = new LogUpdater();
 }