示例#1
0
        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));
            }
        }
示例#2
0
        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));
            }
        }
示例#3
0
 public void AddConnection(Connection connection)
 {
     contents.AddConnection(connection);
 }