protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); setAttribute(obj, "Name", Name); setAttribute(obj, "Description", Description); obj["MaterialProfiles"] = new JArray(MaterialProfiles.ConvertAll(x => x.getJson(this, options))); if (mCompositeProfile != null) { obj["CompositeProfile"] = CompositeProfile.getJson(this, options); } }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <string, XmlElement> processed) { base.SetXML(xml, host, processed); setAttribute(xml, "Name", Name); setAttribute(xml, "Description", Description); XmlElement element = xml.OwnerDocument.CreateElement("MaterialProfiles", mDatabase.mXmlNamespace); xml.AppendChild(element); foreach (IfcMaterialProfile p in MaterialProfiles) { element.AppendChild(p.GetXML(xml.OwnerDocument, "", this, processed)); } if (mCompositeProfile != null) { xml.AppendChild(CompositeProfile.GetXML(xml.OwnerDocument, "CompositeProfile", this, processed)); } }