Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        internal static EntityTypeElementXml ConvertToNode(EntityTypeElement model)
        {
            var xml = new EntityTypeElementXml();

            xml.FullName       = model.FullName;
            xml.Label          = model.Label;
            xml.Left           = model.Left;
            xml.Top            = model.Top;
            xml.Width          = model.Width;
            xml.Height         = model.Height;
            xml.HideProperties = model.HideProperties;
            xml.IsAggtRoot     = model.IsAggtRoot;

            xml.Properties = new PropertyElementXml[model.Properties.Count];
            for (int i = 0, c = model.Properties.Count; i < c; i++)
            {
                var property    = model.Properties[i];
                var propertyXml = PropertyElementXml.ConvertToNode(property);
                xml.Properties[i] = propertyXml;
            }

            return(xml);
        }
Ejemplo n.º 3
0
        internal static EntityTypeElementXml ConvertToNode(EntityTypeElement model)
        {
            var xml = new EntityTypeElementXml();

            xml.FullName = model.FullName;
            xml.Label = model.Label;
            xml.Left = model.Left;
            xml.Top = model.Top;
            xml.Width = model.Width;
            xml.Height = model.Height;
            xml.HideProperties = model.HideProperties;
            xml.IsAggtRoot = model.IsAggtRoot;

            xml.Properties = new PropertyElementXml[model.Properties.Count];
            for (int i = 0, c = model.Properties.Count; i < c; i++)
            {
                var property = model.Properties[i];
                var propertyXml = PropertyElementXml.ConvertToNode(property);
                xml.Properties[i] = propertyXml;
            }

            return xml;
        }