コード例 #1
0
ファイル: Program.cs プロジェクト: exploitx3/HighQualityCode
        static void Main()
        {
            string code = File.ReadAllText(ProgramPath);

            var compiler = new CSharpCompiler();
            compiler.Compile(code);
            compiler.Execute(EntryClassName);
        }
コード例 #2
0
        static void Main()
        {
            string code = File.ReadAllText(ProgramPath);

            var compiler = new CSharpCompiler();
            compiler.Compile(code);
            compiler.Execute(EntryClassName);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: EBojilova/CSharpHQC
        public static void Main()
        {
            string code = File.ReadAllText(ProgramPath);

            IValidationStrategy strategy = new CodeLengthValidator();
            var compiler = new CSharpCompiler(strategy);
            compiler.Compile(code);
            compiler.Execute(EntryClassName);
        }
コード例 #4
0
 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);
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: 0000duck/Fundamental-Level
        static void Main()
        {
            string code = File.ReadAllText(ProgramPath);

            IValidationStrategy strategy = new CodeLengthValidator();
            var compiler = new CSharpCompiler(strategy);

            compiler.Compile(code);
            compiler.Execute(EntryClassName);
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: vasilvalchanov/OOP
        static void Main()
        {
            try
            {
                string code = File.ReadAllText(ProgramPath);

                ICodeValidationStrategy strategy = new CodeLenghtValidator();
                strategy = new SystemNetValidator();
                var compiler = new CSharpCompiler(strategy);
                compiler.Compile(code);
                compiler.Execute(EntryClassName);
            }
            catch (CompilationException ex)
            {
                Console.WriteLine(ex.Message);
            }
        }