コード例 #1
0
        public override bool connect(connectable <T> target)
        {
            if (target.GetType() != typeof(Output <T>))
            {
                return(false);
            }

            this.add_connection(target);
            target.add_connection(this);
            return(true);
        }
コード例 #2
0
        public override bool disconnect(int index)
        {
            if (this.connections.Count > index)
            {
                return(false);
            }
            connectable <T> target = this.connections[index];

            target.remove_connection(this);
            this.remove_connection(target);
            return(true);
        }
コード例 #3
0
 public override bool disconnect(connectable <T> target)
 {
     target.remove_connection(this);
     return(true);
 }