Example #1
0
 public void AddPort(bool input, string fieldName)
 {
     if (input)
     {
         inputPorts.Add(new NodePort(this, fieldName));
     }
     else
     {
         outputPorts.Add(new NodePort(this, fieldName));
     }
 }
        /// <summary>
        /// Add a port
        /// </summary>
        /// <param name="input">is input port</param>
        /// <param name="fieldName">C# field name</param>
        /// <param name="portData">Data of the port</param>
        public void AddPort(bool input, string fieldName, PortData portData)
        {
            // Fixup port data info if needed:
            if (portData.displayType == null)
            {
                portData.displayType = nodeFields[fieldName].info.FieldType;
            }

            if (input)
            {
                inputPorts.Add(new NodePort(this, fieldName, portData));
            }
            else
            {
                outputPorts.Add(new NodePort(this, fieldName, portData));
            }
        }