示例#1
0
        public static void Main()
        {
            string code = File.ReadAllText(ProgramPath);

            IValidationStrategy strategy = new CodeLengthValidator();
            var compiler = new CSharpCompiler(strategy);
            compiler.Compile(code);
            compiler.Execute(EntryClassName);
        }
 static void Main()
 {
     string code = File.ReadAllText(ProgramPath);
     ICodeSyntaxValidationStrategy codeValidationStrategy = new CodeLengthValidator();
     // codeValidationStrategy = new SystemNetValidator();
     var compiler = new CSharpCompiler(codeValidationStrategy);
     compiler.Compile(code);
     compiler.Execute(EntryClassName);
 }