示例#1
0
        public NodePort(BaseNode owner, string fieldName)
        {
            this.fieldName = fieldName;
            this.owner     = owner;

            ourValueField = owner.GetType().GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);

            customPortIOMethod = CustomPortIO.GetCustomPortMethod(owner.GetType(), fieldName);
        }
示例#2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="owner">owner node</param>
        /// <param name="fieldName">the C# property name</param>
        /// <param name="portData">Data of the port</param>
        public NodePort(BaseNode owner, string fieldName, PortData portData)
        {
            this.fieldName = fieldName;
            this.owner     = owner;
            this.portData  = portData;

            fieldInfo = owner.GetType().GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);

            customPortIOMethod = CustomPortIO.GetCustomPortMethod(owner.GetType(), fieldName);
        }