Duplicate property names generated into T4DocoptNet.cs
geoff5777 opened this issue · comments
geoff5777 commented
Consider this doc excerpt:
Usage:
Send.exe (table|view) TABLE [-a alias] -s <instance> -d <database>
[-m <queueManagerName>] -q <queueName> [-p
Send.exe message MESSAGE [-m <queueManagerName>] -q <queueName
The resulting generated code duplicates OptQueuemanager
and OptQueue
properties.
This was resolved by adding Distinct()
in the final loop of Docopt.GenerateCode()
:
foreach (var p in res.Flat().Distinct())
{
sb.AppendLine(p.GenerateCode());
}
return sb.ToString();
Mark Clearwater commented
👍 I'm getting this issue as well