-
Notifications
You must be signed in to change notification settings - Fork 992
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
Enable nullable reference types for System.Windows.Forms.Primitives #3451
Conversation
src/System.Windows.Forms.Primitives/src/Interop/User32/Interop.EnumChildWindows.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TaskDialog.cs
Outdated
Show resolved
Hide resolved
@vladimir-krestov @SergeySmirnov-Akvelon @Ryuugamine please note of NRT annotations for the accessibility-related API. |
@@ -832,12 +832,14 @@ HRESULT UiaCore.IAccessibleEx.ConvertReturnedElement(UiaCore.IRawElementProvider | |||
|
|||
IAccessible? UiaCore.ILegacyIAccessibleProvider.GetIAccessible() => AsIAccessible(this); | |||
|
|||
object?[] UiaCore.ILegacyIAccessibleProvider.GetSelection() | |||
object[]? UiaCore.ILegacyIAccessibleProvider.GetSelection() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one worries me- it was clearly object?[]
historically. That may have been wrong, but I would want the functional change taken out of this so we discuss and track for regression purposes if we take this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my guess work when I annotated AccessibleObject
in #3273 based on the use. Now having annotated the imported interface object[]?
looked more appropriate.
Now I'm re-reading docs, and it looks like it may be returning an empty array, if there is no selection - https://docs.microsoft.com/en-us/dotnet/api/system.windows.automation.provider.iselectionprovider.getselection?view=netcore-3.1#remarks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On further review, the current annotation is consistent with the existing implementation:
internal virtual UiaCore.IRawElementProviderSimple[]? GetSelection() => null; |
Line 42 in 423b2bc
object[] /* IRawElementProviderSimple[] */ GetSelection(); |
So I'm leaving it as is.
@vladimir-krestov please review the API definitions for correctness (i.e. is null
appropriate or has to be empty array?) and update, if necessary.
src/System.Windows.Forms/src/System/Windows/Forms/InternalAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Primitives/src/Interop/User32/Interop.EnumThreadWindows.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Primitives/src/Interop/User32/Interop.EnumWindows.cs
Outdated
Show resolved
Hide resolved
...System.Windows.Forms.Primitives/src/System/Windows/Forms/FileDialogCustomPlacesCollection.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Primitives/src/System/Windows/Forms/Internals/ClientUtils.cs
Show resolved
Hide resolved
src/System.Windows.Forms.Primitives/src/System/Windows/Forms/Internals/DpiHelper.cs
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #3451 +/- ##
====================================================
+ Coverage 66.58567% 98.49746% +31.91179%
====================================================
Files 1338 443 -895
Lines 501683 248046 -253637
Branches 40864 4088 -36776
====================================================
- Hits 334049 244319 -89730
+ Misses 162085 3015 -159070
+ Partials 5549 712 -4837
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…s in the project file.
…he project file. (#3602)
Based on work started by @sharwell in #2676, renders it obsolete.
Microsoft Reviewers: Open in CodeFlow