Beispiel #1
0
    public void addConnector(XElement attrNode, Class cl)
    {
        Connector connector = new Connector();
        cl.addConnector(connector);

        foreach (XElement child in attrNode.Elements())
        {
            if (child.Name.LocalName.CompareTo("end") == 0)
            {
                string partWithPort = "";
                string role = "";

                

                XAttribute attr = (XAttribute)child.Attribute("partWithPort");
                if (attr != null)
                    partWithPort = attr.Value;

                attr = (XAttribute)child.Attribute("role");
                if (attr != null)
                    role = attr.Value;


                if (partWithPort != "")
                {
                    ConnectorEnd ce = new ConnectorEnd();
                    connector.addEnd(ce);
                    ConnectorEndT cet;
                    cet.ce = ce;
                    cet.partWithPort = partWithPort;
                    cet.role = role;
                    _connectors.Add(cet);
                }

            }
        }

    }
Beispiel #2
0
 public void addConnector(Connector connector)
 {
     connectors.Add(connector);
 }