add some nullable ref types for image detection#2275
add some nullable ref types for image detection#2275SimonCropp wants to merge 1 commit intoSixLabors:mainfrom SimonCropp:nullable-ref-types-1
Conversation
Definitely the best approach. |
|
|
||
| /// <inheritdoc/> | ||
| public IImageFormat DetectFormat(ReadOnlySpan<byte> header) | ||
| public IImageFormat? DetectFormat(ReadOnlySpan<byte> header) |
There was a problem hiding this comment.
I cannot decide what the best pattern for nullable return types should be. I feel like anything that returns a nullable type should probably use a TryXX(in, out..) pattern (though I still haven't found a nice async pattern for that)
There was a problem hiding this comment.
I feel like anything that returns a nullable type should probably use a TryXX(in, out..)
yeah. i was trying to do this in the least intrusive way
though I still haven't found a nice async pattern for that
neither have I
There was a problem hiding this comment.
happy to add some TryXX overloads. but i would prefer to do those in a new PR
|
Assuming we are 100% committed to finish #2231 for 3.0, we need to decide about the global strategy we want to take to refactor the entire API. The PR doesn't fit the approach recommended by @tocsoft's #2231 (comment) (changes a small-sub area without without step 1). |
|
note that the tryxxx conversation should not be happening on this pr |
|
Thanks for this @SimonCropp and apologies for the slow response. I'm gonna close this in favour of the more general #2282 which allows us to complete step 1 of the global approach. Thanks again |
|
@JimBobSquarePants no worries at all |
My plan it to tackle this as small easily reviewable PRs
given the Big Bang #2236 didnt seem to work