Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Specify comparer when search resource name - #280

#280
Merged
kzu merged 1 commit into
devlooped:maindevlooped/ThisAssembly:mainfrom
atifaziz:patch-1atifaziz/ThisAssembly:patch-1Copy head branch name to clipboard
Jan 30, 2024
Merged

Specify comparer when search resource name#280
kzu merged 1 commit into
devlooped:maindevlooped/ThisAssembly:mainfrom
atifaziz:patch-1atifaziz/ThisAssembly:patch-1Copy head branch name to clipboard

Conversation

@atifaziz

@atifaziz atifaziz commented Jan 7, 2024

Copy link
Copy Markdown
Contributor

The following line causes CA1310 to be flagged in a user project with code analysis enabled:

.GetManifestResourceNames().FirstOrDefault(x => x.EndsWith(resourceName));

It can fail the compilation of the host project if warnings are being treated as errors.

This PR updates the call to specify a comparer explicitly. The choice of StringComparison.Ordinal should be in line with Assembly.GetManifestResourceStream whose documentation states that name is “The case-sensitive name of the manifest resource being requested.”

@CLAassistant

CLAassistant commented Jan 7, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kzu

kzu commented Jan 29, 2024

Copy link
Copy Markdown
Member

@atifaziz if you could sign the CLA, I can merge this!

@atifaziz

Copy link
Copy Markdown
Contributor Author

@atifaziz if you could sign the CLA, I can merge this!

Done

@kzu
kzu enabled auto-merge (rebase) January 30, 2024 15:32
@kzu
kzu merged commit 9d4fd28 into devlooped:main Jan 30, 2024
@atifaziz
atifaziz deleted the patch-1 branch January 30, 2024 15:57
@devlooped devlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.