Пример #1
0
        private void getLinks(NetworkBean network, XmlNode networkNode)
        {
            XmlNodeList xmlNodeList = getChildern(networkNode);

            foreach (XmlNode node in xmlNodeList)
            {
                LinkBean link   = new LinkBean();
                string   target = getNodeAttrValue(node, AttrType.Target);
                string   source = getNodeAttrValue(node, AttrType.Source);
                link.target = XmlMapping.findNodeBeanById(target, network.group2);
                link.source = XmlMapping.findNodeBeanById(source, network.group1);

                network.llb.Add(link);
            }
        }
Пример #2
0
        public void getNetworks(ref List<NetworkBean> networks)
        {
            if (networks == null) networks = new List<NetworkBean>();

            XmlNodeList xmlNodeList = getNetworks();
            foreach (XmlNode node in xmlNodeList)
            {
                NetworkBean network = new NetworkBean();

                network.group1 = XmlMapping.findGroupById(getNodeAttrValue(node, AttrType.Target));
                network.group2 = XmlMapping.findGroupById(getNodeAttrValue(node, AttrType.Source));

                getLinks(network, node);

                networks.Add(network);
            }
        }
Пример #3
0
        public void getNetworks(ref List <NetworkBean> networks)
        {
            if (networks == null)
            {
                networks = new List <NetworkBean>();
            }

            XmlNodeList xmlNodeList = getNetworks();

            foreach (XmlNode node in xmlNodeList)
            {
                NetworkBean network = new NetworkBean();

                network.group1 = XmlMapping.findGroupById(getNodeAttrValue(node, AttrType.Target));
                network.group2 = XmlMapping.findGroupById(getNodeAttrValue(node, AttrType.Source));

                getLinks(network, node);

                networks.Add(network);
            }
        }
Пример #4
0
        private void getLinks(NetworkBean network, XmlNode networkNode)
        {
            XmlNodeList xmlNodeList = getChildern(networkNode);
            foreach (XmlNode node in xmlNodeList)
            {
                LinkBean link = new LinkBean();
                string target = getNodeAttrValue(node, AttrType.Target);
                string source = getNodeAttrValue(node, AttrType.Source);
                link.target = XmlMapping.findNodeBeanById(target, network.group2);
                link.source = XmlMapping.findNodeBeanById(source, network.group1);

                network.llb.Add(link);
            }
        }