Benglin/Dynamo — pull request #142 by aosyatnik (2014-10-24 11:56:13+00:00)
Title: DUI: typed parameters to string improvement

# Description
This is taken from [this](https://github.com/Benglin/Dynamo/pull/91) pull request. The current implementation `Utilities.TypedParametersToString` method could use some improvements.

Method signatureThe signature should have been:
``` c#
public static string TypedParametersToString(FunctionDescriptor descriptor,
string overridePrefix = string.Empty)
{
// ...
}
```

Overriding name prefixThe method body should use the `overridePrefix` if one is supplied, or fallback to use `NormalizeAsResourceName` if none is supplied:
``` c#
public static string TypedParametersToString(...)
{
// If the caller does not supply a prefix, use default logic to generate one.
if (string.IsNullOrEmpty(overridePrefix))
overridePrefix = NormalizeAsResourceName(FunctionDescriptor.QualifiedName);

return overridePrefix + '''.''' + builder.ToString();
}
```
DocumentationThe following comment should be moved to one of the callers (choose a caller that is having the issue of names with invalid symbols):

``` c#
// Case for nodes which have in name forbidden symbols e.g. %, <, >, etc.
// Should be used FunctionDescriptor.Name property instead.
// For example: we have DynamoUnits.SUnit.%, but we want to have DynamoUnits.SUnit.mod
```

# Reviewers
@Benglin ,@vmoyseenko, please take a look.

Link to YouTrack:
[MAGN-4956](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4956) DUI: Improve TypedParametersToString utility method