Ejemplo n.º 1
0
        private static void Compile(string ontologyFilePath, string namespaceName)
        {
            var result = ModelGenerator.CompileAssembly(ontologyFilePath, namespaceName);

            if (result.Errors.Count > 0)
            {
                foreach (CompilerError error in result.Errors)
                {
                    Console.Error.WriteLine(error.ErrorText);
                }

                throw new Exception($"{result.Errors.Count} problem(s) while generating assembly");
            }

            Console.WriteLine($"Compiled to {result.CompiledAssembly.Location}");
        }