//C:\Projects\Graduation Project\ExecutionEnvironment\userId %cd% $(pwd) // docker run -i -t -d --name executer -v "$(pwd):/home" -w /home mono; docker exec executer csc Main.cs; docker exec executer mono Main.exe test1.txt > hello.txt; docker rm -f executer; public void CreateEnvironment(string userId, ProgramingLanguage programingL, IEnumerable <SolutionFile> inputFiles, IEnumerable <TestCase> testCases) { Directory.CreateDirectory(_root + _ds + userId); foreach (var file in inputFiles) { using (StreamWriter writetext = new StreamWriter(_root + userId + _ds + file.Name)) { writetext.Write(file.Content); } } using (StreamWriter writetext = new StreamWriter(_root + userId + _ds + _testCases)) { foreach (var testCase in testCases) { writetext.Write(testCase.No + _spliter + testCase.Arguments + _spliter + testCase.ExpectedOutput + _spliter + testCase.IsHidden + _spliter); } } using (StreamWriter writetext = new StreamWriter(_root + userId + _ds + _environmentSettings)) { writetext.Write(programingL.ToString()); } }
public bool CodeCheckSyntax(string code, ProgramingLanguage programingLanguage) { return(programingLanguage == ProgramingLanguage.C_SHARP); }