IfcDoc.Program.ImportXsd C# (CSharp) Méthode

ImportXsd() static private méthode

static private ImportXsd ( IfcDoc schema, DocProject docProject ) : DocSchema
schema IfcDoc
docProject DocProject
Résultat DocSchema
        internal static DocSchema ImportXsd(IfcDoc.Schema.XSD.schema schema, DocProject docProject)
        {
            // use resource-level section
            DocSection docSection = docProject.Sections[6]; // source schemas

            DocSchema docSchema = new DocSchema();
            docSchema.Name = schema.id;//??
            docSchema.Code = schema.id;
            docSchema.Version = schema.version;
            docSection.Schemas.Add(docSchema);

            foreach(IfcDoc.Schema.XSD.simpleType simple in schema.simpleType)
            {
                ImportXsdSimple(simple, docSchema, null);
            }

            foreach (IfcDoc.Schema.XSD.complexType complex in schema.complexType)
            {
                DocEntity docEntity = new DocEntity();
                docSchema.Entities.Add(docEntity);
                docEntity.Name = complex.name;
                docEntity.Documentation = ImportXsdAnnotation(complex.annotation);

                ImportXsdComplex(complex, docSchema, docEntity);
            }

            foreach (IfcDoc.Schema.XSD.element element in schema.element)
            {
                DocEntity docEntity = new DocEntity();
                docSchema.Entities.Add(docEntity);
                docEntity.Name = element.name;
                docEntity.Documentation = ImportXsdAnnotation(element.annotation);

                ImportXsdComplex(element.complexType, docSchema, docEntity);
            }

            return docSchema;
        }