Skip to content

Commit b6f5147

Browse files
committed
GetUsersFromWorkItems returns HashSet instead of List
1 parent 013ae47 commit b6f5147

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public TfsUserMappingTool(IOptions<TfsUserMappingToolOptions> options, IServiceP
2222
{
2323
}
2424

25-
private List<string> GetUsersFromWorkItems(List<WorkItemData> workitems, List<string> identityFieldsToCheck)
25+
private HashSet<string> GetUsersFromWorkItems(List<WorkItemData> workitems, List<string> identityFieldsToCheck)
2626
{
27-
List<string> foundUsers = new List<string>();
27+
HashSet<string> foundUsers = new(StringComparer.CurrentCultureIgnoreCase);
2828
foreach (var wItem in workitems)
2929
{
3030
foreach (var rItem in wItem.Revisions.Values)
@@ -148,7 +148,7 @@ public List<IdentityMapData> GetUsersInSourceMappedToTargetForWorkItems(TfsProce
148148
if (Options.Enabled)
149149
{
150150
Dictionary<string, string> result = new Dictionary<string, string>();
151-
List<string> workItemUsers = GetUsersFromWorkItems(sourceWorkItems, Options.IdentityFieldsToCheck);
151+
HashSet<string> workItemUsers = GetUsersFromWorkItems(sourceWorkItems, Options.IdentityFieldsToCheck);
152152
Log.LogDebug($"TfsUserMappingTool::GetUsersInSourceMappedToTargetForWorkItems [workItemUsers|{workItemUsers.Count}]");
153153
List<IdentityMapData> mappedUsers = GetUsersInSourceMappedToTarget(processor);
154154
Log.LogDebug($"TfsUserMappingTool::GetUsersInSourceMappedToTargetForWorkItems [mappedUsers|{mappedUsers.Count}]");

0 commit comments

Comments
 (0)