Exemple #1
0
        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);
            }
        }