private static void Main(string[] args) { var prjPath = GetDirectory(Settings.OutputDir); var project = GetProject(prjPath); var rules = new[] { Properties.Resources.IFC2X3_rules, Properties.Resources.IFC4_rules }; var domains = new[] { DomainStructure.LoadIfc2X3(), DomainStructure.LoadIfc4Add1() }; for (var i = 0; i < rules.Length; i++) { var data = rules[i]; Settings.Structure = domains[i]; var schema = new XmlSerializer(typeof(SchemaRules)).Deserialize(new StringReader(data)) as SchemaRules; ProcessSchema(schema, project); } project.Save(); Console.Beep(400, 1000); }
private static DomainStructure GetDomain(SchemaDefinition schema) { switch (schema.Source) { case SchemaSources.IFC2x3_TC1: return(DomainStructure.LoadIfc2X3()); case SchemaSources.IFC4: return(DomainStructure.LoadIfc4()); case SchemaSources.IFC4_ADD1: return(DomainStructure.LoadIfc4Add1()); case SchemaSources.IFC4_ADD2: return(DomainStructure.LoadIfc4Add2()); case SchemaSources.IFC4X1_FINAL: return(DomainStructure.LoadIfc4x1()); default: return(null); } }