private XElement BuildDocTypeXml(DocType dt) { var dtXml = new XElement("DocumentType", new XAttribute("ParentId", dt.ParentId), new XElement("Id", dt.Id), new XElement("Name", dt.Name), new XElement("Alias", dt.Alias), new XElement("Description", dt.Description), BuildPropertiesXml(dt.Properties), BuildAssociationsXml(dt.Associations) ); return dtXml; }
internal DocType BuildDocumentType(IRecordsReader docTypes) { DocType newDocType = new DocType { Id = docTypes.GetId(), Alias = docTypes.GetAlias(), Description = docTypes.GetDescription(), Name = docTypes.GetName(), ParentId = docTypes.GetParentId(), }; newDocType.Properties = GetProperties(newDocType.Id); newDocType.Associations = BuildAssociations(newDocType.Id); return newDocType; }