internal static DocumentXml ConvertToXmlDoc(ODMLDocument document) { var xml = new DocumentXml(); xml.HideNonsenceLabels = document.HideNonsenceLabels; xml.EntityTypes = new EntityTypeElementXml[document.EntityTypes.Count]; for (int i = 0, c = document.EntityTypes.Count; i < c; i++) { var item = document.EntityTypes[i]; xml.EntityTypes[i] = EntityTypeElementXml.ConvertToNode(item); } xml.EnumTypes = new EnumElementXml[document.EnumTypes.Count]; for (int i = 0, c = document.EnumTypes.Count; i < c; i++) { var item = document.EnumTypes[i]; xml.EnumTypes[i] = EnumElementXml.ConvertToNode(item); } xml.Connections = new ConnectionElementXml[document.Connections.Count]; for (int i = 0, c = document.Connections.Count; i < c; i++) { var item = document.Connections[i]; xml.Connections[i] = ConnectionElementXml.ConvertToNode(item); } return(xml); }
internal static EnumElementXml ConvertToNode(EnumElement model) { var xml = new EnumElementXml(); xml.FullName = model.Name; xml.Label = model.Label; xml.Left = model.Left; xml.Top = model.Top; xml.Width = model.Width; xml.Height = model.Height; xml.Items = new EnumItemElementXml[model.Items.Count]; for (int i = 0, c = model.Items.Count; i < c; i++) { var property = model.Items[i]; var propertyXml = EnumItemElementXml.ConvertToNode(property); xml.Items[i] = propertyXml; } return(xml); }
internal static EnumElementXml ConvertToNode(EnumElement model) { var xml = new EnumElementXml(); xml.FullName = model.Name; xml.Label = model.Label; xml.Left = model.Left; xml.Top = model.Top; xml.Width = model.Width; xml.Height = model.Height; xml.Items = new EnumItemElementXml[model.Items.Count]; for (int i = 0, c = model.Items.Count; i < c; i++) { var property = model.Items[i]; var propertyXml = EnumItemElementXml.ConvertToNode(property); xml.Items[i] = propertyXml; } return xml; }