/// <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); })); }
public NodePort GetPort(string fieldName) { return(inputPorts.Concat(outputPorts).FirstOrDefault(p => p.fieldName == fieldName)); }