Skip to content

Commit bef562a

Browse files
Merge pull request Azure#6540 from vladimir-shcherbakov/iss#6183
ListItems labeling added; Issue Azure#6524 fix.
2 parents 88f7295 + be39a3e commit bef562a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/RepoTasks/RepoTasks.Cmdlets.Tests/NewFormatPs1XmlCommandShould.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public void SaveOnlyMarkedPropertiesInSpecifiedViews()
117117
powershell.Commands.AddCommand(cmdlet);
118118
cmdlet.Parameters.Add("ModulePath", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Dummy.psd1"));
119119
cmdlet.Parameters.Add("OnlyMarkedProperties");
120+
cmdlet.Parameters.Add("OutputPath", AppDomain.CurrentDomain.BaseDirectory);
120121

121122
var results = powershell.Invoke<string>();
122123

tools/RepoTasks/RepoTasks.RemoteWorker/AppDomainWorker.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,14 @@ internal void HandleMemberInfo<T>(
309309
}
310310
: new ListItem
311311
{
312-
PropertyName = memberInfo.Name,
312+
PropertyName = memberInfo.Name
313313
};
314314

315+
if (ps1XmlAttribute.Label != null)
316+
{
317+
listItem.Label = ps1XmlAttribute.Label;
318+
}
319+
315320
if (position == Ps1XmlConstants.DefaultPosition)
316321
{
317322
listItems.Add(listItem);
@@ -368,7 +373,7 @@ internal void HandleMemberInfo<T>(
368373
var warning = "Found a duplicate. ";
369374
foreach (var duplicate in duplicates)
370375
{
371-
warning += $"Position value of {duplicate.Key} specified:";
376+
warning += $"Position value of {duplicate.Key} specified: ";
372377
foreach (var tuple in duplicate)
373378
{
374379
var outputTypeName = tuple.Item1;

0 commit comments

Comments
 (0)