/// <summary> /// Removes the last input data pin for an array element. /// Returns whether one was actually removed. /// </summary> /// <returns>Whether a pin was removed.</returns> public bool RemoveElementPin() { if (InputDataPins.Count > 0) { // TODO: Add method for removing pins on Node NodeInputDataPin inputDataPin = InputDataPins[InputDataPins.Count - 1]; GraphUtil.DisconnectInputDataPin(inputDataPin); InputDataPins.Remove(inputDataPin); return(true); } return(false); }
public void RemoveReturnType() { if (this != Method.MainReturnNode) { throw new InvalidOperationException("Can only remove return types on the main return node."); } if (InputDataPins.Count > 0) { NodeInputDataPin idpToRemove = InputDataPins.Last(); NodeInputTypePin itpToRemove = InputTypePins.Last(); GraphUtil.DisconnectInputDataPin(idpToRemove); GraphUtil.DisconnectInputTypePin(itpToRemove); InputDataPins.Remove(idpToRemove); InputTypePins.Remove(itpToRemove); } }