-
-
Notifications
You must be signed in to change notification settings - Fork 891
ISSUE #2385 - Implementing try get pattern to TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format) #2386
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
Conversation
|
Thanks for this. That's a neat fix 👍 Was that locally failing test the memory one? The test explorer in VS doesn't respect the conditional value on the query. It works via dotnet test. |
|
@JimBobSquarePants no failures as far as I am aware but I will let @Ollie-Ave follow-up with you. What's your release schedule? |
|
@JimBobSquarePants Thanks for the speedy response with this issue as a whole. |
You'll be able to access this release now on our nightly feed. |
When will this be available via NuGet? |
|
I don’t know. We only released v3.0.0 a few days ago so will likely capture a few more issues first. This is non-critical so does not require immediate release |
|
Fair enough, thanks for your help! |
Prerequisites
Description
An issue was raised recently (#2385) Implementing try get pattern to
public bool TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format). This PR simply removesGuard.NotNullOrWhiteSpace(extension, nameof(extension));on line105in amendment to this.I have also added a check for null or whitespace before the check for the presence of a
'.'character to prevent out of range exceptions.I have not edited any other code and there were no extra Unit Test failures after this change was made (1 unit test was failing before any changes were made to the branch)