Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,21 @@ public string GetRidsFromPackage(Package package)
{
if (item.AssetType == AssetType.RuntimeAsset)
{
if (!rids.Contains(item.Rid + "-x64"))
rids.Add(item.Rid + "-x64");
string testRid = item.Rid;
string testArch = "-x64";
if (testRid == "unix")
{
if (!rids.Contains("linux" + testArch))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you can avoid all these Contains checks by using a HashSet<string> instead of List<string>.

Copy link
Contributor Author

@Anipik Anipik Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will address this change with all the other feedback in the previous pr.

rids.Add("linux" + testArch);

if (!rids.Contains("osx" + testArch))
rids.Add("osx" + testArch);
}
else
{
if (!rids.Contains(testRid + testArch))
rids.Add(testRid + testArch);
}
}
}
return string.Join(";", rids);
Expand Down