public void addInput(GenericComponent component) { if (modifyArray(null, component)) { component.output.Add(this); } }
public override void Execute() { GenericComponent source = input[0]; this.state = !source.state; //notifyOutput(); }
//executes a generic modification on the array, replacing the target component with the value private bool modifyArray(GenericComponent target, GenericComponent value) { int size = input.Count; input.Add(value); if (input.Count == size) { return(false); } return(true); }