Пример #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);
 }