Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
only append () to function's uid
Browse files Browse the repository at this point in the history
  • Loading branch information
superyyrrzz committed Sep 8, 2017
1 parent f7f06ae commit 48fe694
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/Microsoft.Content.Build.Code2Yaml.Steps/PreprocessXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,20 @@ private static string PreprocessMemberUid(XElement memberDef)
builder.Append(parentId);
builder.Append(Constants.IdSpliter);
builder.Append(memberDef.Element("name").Value);
builder.Append("(");
var parameters = memberDef.XPathSelectElements("param/type").ToList();
if (parameters.Count > 0)
if (memberDef.Attribute("kind")?.Value == "function")
{
builder.Append(parameters[0].Value);
}
foreach (var param in parameters.Skip(1))
{
builder.Append("," + param.Value);
builder.Append("(");
var parameters = memberDef.XPathSelectElements("param/type").ToList();
if (parameters.Count > 0)
{
builder.Append(parameters[0].Value);
}
foreach (var param in parameters.Skip(1))
{
builder.Append("," + param.Value);
}
builder.Append(")");
}
builder.Append(")");
return builder.ToString();
}

Expand Down

0 comments on commit 48fe694

Please sign in to comment.