public void AddConnection(ContainerAttachmentPoint second, double throughput = 0, bool isTwoWay = true) { connections.Add(new Connection(second, throughput)); if (isTwoWay && second != null) { second.AddConnection(new Connection(this, throughput)); } }
public void AddConnection(Dictionary <string, object> data, bool isTwoWay = true) { if (!data.ContainsKey("parent")) { data.Add("parent", this); } else { data["parent"] = this; } connections.Add(new Connection(data)); if (isTwoWay && data.ContainsKey("second")) { ContainerAttachmentPoint second = data["second"] as ContainerAttachmentPoint; data["parent"] = second; data["second"] = this; second.AddConnection(new Connection(data)); } }
public void AddConnection(Connection connection) { contents.AddConnection(connection); }