Skip to content
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

Assembly name comparison #439

Open
Sten-V opened this issue Mar 29, 2021 · 3 comments
Open

Assembly name comparison #439

Sten-V opened this issue Mar 29, 2021 · 3 comments
Assignees

Comments

@Sten-V
Copy link

Sten-V commented Mar 29, 2021

Is it possible that this call to Contains(...) instead should be a call to Equals(...), or is this intentional?

if (excludedAssemblies.Any(s => s.Contains(assemblyRef.Name))) { continue; }

@toddams
Copy link
Owner

toddams commented Apr 6, 2021

excludedAssemblies is a collection, assemblyRef.Name is a string. This is intentional

@toddams toddams closed this as completed Apr 6, 2021
@Sten-V
Copy link
Author

Sten-V commented Apr 6, 2021

Yes, but the Contains(...) is not performed directly on that collection, it done on every string in that collection the way it looks now.
And because it is a Contains(...) comparison between two strings it's quite possible to exclude more assemblies than the consuming code intended.

@toddams
Copy link
Owner

toddams commented Apr 7, 2021

Sorry, I actually overlooked the point. It's indeed weird, I'll double-check

@toddams toddams reopened this Apr 7, 2021
@jzabroski jzabroski self-assigned this Aug 3, 2021
@jzabroski jzabroski pinned this issue Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants