-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ToDictionarySkipDuplicates
- fix duplicate key.
#395
Conversation
ToDictionarySkipDuplicates
ToDictionarySkipDuplicates
- fix duplicate key.
Hey @warappa could you take a look if skip the duplicate key is a valid solution. Thanks. |
I think this is fine! 👍 |
The only question that arises is, if the deep-first-search is then the correct one to do or if in such a case a "top-first-search" would be better. You woukd have to test if the newer System.Text.Json is detected or the older one. EDIT: But maybe this is not of an issue here, as we compare the |
Actually is not a Like creating a copy of the dll and repack the source and the copy. This trigger the same key in the dictionary. #394 |
var dict = new Dictionary<string, AssemblyDefinition>(); | ||
foreach (var assembly in assemblies) | ||
{ | ||
if (!dict.ContainsKey(assembly.Name.Name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assembly.Name.Name is repeated three times, it's good to extract a local variable and reuse it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, oh you already changed to the key
. Nice!
This pr is related to the issue: #394