Skip to content

Commit 22e8fed

Browse files
authored
Write type data to the pipeline instead of collecting it (PowerShell#24236)
1 parent 552b87b commit 22e8fed

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,25 +1335,18 @@ protected override void ProcessRecord()
13351335
ValidateTypeName();
13361336

13371337
Dictionary<string, TypeData> alltypes = Context.TypeTable.GetAllTypeData();
1338-
Collection<TypeData> typedefs = new();
13391338

13401339
foreach (string type in alltypes.Keys)
13411340
{
13421341
foreach (WildcardPattern pattern in _filter)
13431342
{
13441343
if (pattern.IsMatch(type))
13451344
{
1346-
typedefs.Add(alltypes[type]);
1345+
WriteObject(alltypes[type]);
13471346
break;
13481347
}
13491348
}
13501349
}
1351-
1352-
// write out all the available type definitions
1353-
foreach (TypeData typedef in typedefs)
1354-
{
1355-
WriteObject(typedef);
1356-
}
13571350
}
13581351
}
13591352

0 commit comments

Comments
 (0)