Beispiel #1
0
        public static Type CompileProject(DocProject docProject, bool psets)
        {
            Compiler compiler = new Compiler(docProject, null, null, psets);

            System.Reflection.Emit.AssemblyBuilder assembly = compiler.Assembly;
            Type[] types = null;
            try
            {
                types = assembly.GetTypes();
            }
            catch (System.Reflection.ReflectionTypeLoadException)
            {
                // schema could not be compiled according to definition
            }

            foreach (Type t in types)
            {
                // todo: make root type configurable with schema
                if (t.Name.Equals("IfcProject"))
                {
                    return(t);
                }
            }

            return(null);            // no root type
        }