Esempio n. 1
0
 /// <summary>
 /// Get the port from field name and identifier
 /// </summary>
 /// <param name="fieldName">C# field name</param>
 /// <param name="identifier">Unique port identifier</param>
 /// <returns></returns>
 public NodePort GetPort(string fieldName, string identifier)
 {
     return(inputPorts.Concat(outputPorts).FirstOrDefault(p => {
         var bothNull = String.IsNullOrEmpty(identifier) && String.IsNullOrEmpty(p.portData.identifier);
         return p.fieldName == fieldName && (bothNull || identifier == p.portData.identifier);
     }));
 }
Esempio n. 2
0
 public NodePort GetPort(string fieldName)
 {
     return(inputPorts.Concat(outputPorts).FirstOrDefault(p => p.fieldName == fieldName));
 }