private string GetOrCreatePinName(NodeOutputDataPin pin) { // Return the default value of the pin type if nothing is connected if (pin == null) { return("null"); } if (variableNames.ContainsKey(pin)) { return(variableNames[pin]); } string pinName; // Special case for property setters, input name "value". // TODO: Don't rely on set_ prefix if (pin.Node is EntryNode && method.Name.StartsWith("set_")) { pinName = "value"; } else { pinName = TranslatorUtil.GetUniqueVariableName(pin.Name.Replace("<", "_").Replace(">", "_"), variableNames.Values.ToList()); } variableNames.Add(pin, pinName); return(pinName); }
private string GetOrCreatePinName(NodeOutputDataPin pin) { // Return the default value of the pin type if nothing is connected if (pin == null) { return("null"); } if (variableNames.ContainsKey(pin)) { return(variableNames[pin]); } string pinName = TranslatorUtil.GetUniqueVariableName(pin.Name, variableNames.Values.ToList()); variableNames.Add(pin, pinName); return(pinName); }