IfcDoc.Program.ImportMvdObject C# (CSharp) Method

ImportMvdObject() private static method

Helper function to populate attributes
private static ImportMvdObject ( Element mvd, DocObject doc ) : void
mvd IfcDoc.Schema.MVD.Element
doc DocObject
return void
        private static void ImportMvdObject(Element mvd, DocObject doc)
        {
            doc.Name = mvd.Name;
            doc.Uuid = mvd.Uuid;
            doc.Version = mvd.Version;
            doc.Owner = mvd.Owner;
            doc.Status = mvd.Status;
            doc.Copyright = mvd.Copyright;
            doc.Code = mvd.Code;
            doc.Author = mvd.Author;

            if (mvd.Definitions != null)
            {
                foreach (Definition def in mvd.Definitions)
                {
                    if (def != null)
                    {
                        // base definition
                        if (def.Body != null)
                        {
                            doc.Documentation = def.Body.Content;
                        }

                        if (def.Links != null)
                        {
                            foreach (Link link in def.Links)
                            {
                                DocLocalization loc = new DocLocalization();
                                doc.Localization.Add(loc);
                                loc.Name = link.Title;
                                loc.Documentation = link.Content;
                                loc.Category = (DocCategoryEnum)Enum.Parse(typeof(DocCategoryEnum), link.Category.ToString());
                                loc.Locale = link.Lang;
                                loc.URL = link.Href;
                            }
                        }
                    }
                }
            }
        }