public void ReadXmlComponentImplements(System.Xml.XmlReader reader, DanuComponent comp) { reader.Read(); while (reader.Read()) { if (reader.Name.Equals("Interface")) { DanuInterfaceObject io = GetInterface(reader.ReadElementString()); DanuSocket so = new DanuSocket(comp, io); AddSocket(so); foreach (DanuComponent checkComp in Components) { if (checkComp.Interfaces.Contains(io)) { io.Eshu.Parent = checkComp.Specification.Classes.FirstOrDefault(); io.Eshu.ImplementingParents.Add(checkComp.Specification.Classes.FirstOrDefault()); } } } } reader.Close(); }
public void AddRelationship(DanuComponent parent, DanuSocket socket) { relatedSockets.Add(parent, socket); }
public void AddSocket(DanuSocket so) { components[so.Parent.Name].Sockets.Add(so); interfaces[so.InterfaceUsed.Name].PossibleSockets.Add(so.Parent); }
/// <summary> /// Adds Socket to a Danu Component. Adds all its attributes, and adds it to /// its parent component and related interface. /// </summary> public void AddSocket(Socket so) { DanuSocket newSocket = new DanuSocket(components[so.Parent.Name], interfaces[so.AttachedInterface.Name]); AddSocket(newSocket); }