-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ISite.Container nullability annotation does not match the documentation #42742
Comments
Tagging subscribers to this area: @safern |
cc @buyaa-n was this discussed? Couldn't find it here: dotnet/corefx#41185 |
That Remark is a bit confusing, but yeah seems it should be nullable Now wondering if the
Also confusing ...
Doesn't seem we discussed it cc @stephentoub |
According to apisof.net, this API is used in only 6.2% of apps scanned; is the API commonly used in Windows desktop applications though? The bar we're using for 5.0 follows:
If this is a commonly-used API for Windows desktop applications, then it would meet the bar. |
We should make it nullable. But technically it doesn't meet the cited bar for release/5.0, as it could introduce new warnings. Whether it would actually cause problems in the .NET 5 build, not sure... I expect we'll have a couple of places to fix up in dotnet/runtime, but that the bulk of the impact would be on winforms, which I don't believe is annotated yet. |
Ah, right; of course. Thanks, @stephentoub. We'll keep this in 6.0 then. |
ISite.Container is marked as non-nullable:
runtime/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/ISite.cs
Line 29 in 627f133
But the docs explicitly mention that the property can be null (https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.isite.container?view=netcore-3.1#remarks):
At least two .NET Framework implementations of ISite.Container return null, so this has been established for a while.
The text was updated successfully, but these errors were encountered: