-
Notifications
You must be signed in to change notification settings - Fork 999
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
Avoids a System.InvalidCastException
error to be thrown when passing ObjectCollection
to AddRangeInternal
of the DataGridViewComboBoxCell.ObjectCollection
class
#12613
Conversation
60e3845
to
baa8edf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12613 +/- ##
====================================================
- Coverage 75.91962% 49.78234% -26.13728%
====================================================
Files 3164 1979 -1185
Lines 636813 284155 -352658
Branches 47008 41746 -5262
====================================================
- Hits 483466 141459 -342007
+ Misses 149884 139996 -9888
+ Partials 3463 2700 -763
Flags with carried forward coverage won't be shown. Click here to find out more. |
baa8edf
to
b72cfc6
Compare
.../src/System/Windows/Forms/Controls/DataGridView/DataGridViewComboBoxCell.ObjectCollection.cs
Outdated
Show resolved
Hide resolved
…ObjectCollection to AddRangeInternal of the DataGridViewComboBoxCell.ObjectCollection Fixes dotnet#12612 ## Proposed changes - Avoids a `System.InvalidCastException` error to be thrown when passing `ObjectCollection` to `AddRangeInternal` of the `DataGridViewComboBoxCell.ObjectCollection` class, by: - Modifying the `AddRange(ObjectCollection value)` method - Adding the `AddRangeInternal(ObjectCollection items)` methods - Adds unit test ## Customer Impact - Avoids a possible `System.InvalidCastException` ## Regression? - No ## Risk - Minimal ## Screenshots ### Before ### After ## Test methodology - Unit tests ## Accessibility testing ## Test environment(s) - `10.0.100-alpha.1.24573.1`
b72cfc6
to
7f53401
Compare
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.
Thank you!
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.
👍
@ricardobossan Want to confirm with you if [WinFormsFact] is missing? |
Fixes dotnet#12612 Related dotnet#12613 ## Root Cause - A `[WinFormsFact]` annotation was missing from a unit test in PR dotnet#12613, causing the test not to execute as part of the suite. ## Proposed changes - Add the missing `[WinFormsFact]` annotation to the relevant unit test. ## Customer Impact - Ensures the test runs as intended, increasing coverage and preventing regressions in the modified `DataGridViewComboBoxCell.ObjectCollection` class. ## Regression? - No ## Risk - Minimal ## Test methodology - Unit tests ## Test environment(s) - 10.0.100-alpha.1.24573.1
@MelonWang1 Thanks for catching that! I've added the |
…12685) Fixes #12612 Related #12613 ## Root Cause - A `[WinFormsFact]` annotation was missing from a unit test in PR #12613, causing the test not to execute as part of the suite. ## Proposed changes - Add the missing `[WinFormsFact]` annotation to the relevant unit test. ## Customer Impact - Ensures the test runs as intended, increasing coverage and preventing regressions in the modified `DataGridViewComboBoxCell.ObjectCollection` class. ## Regression? - No ## Risk - Minimal ## Test methodology - Unit tests ## Test environment(s) - 10.0.100-alpha.1.24573.1 Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <v-rbossan@microsoft.com>
Fixes #12612
Proposed changes
System.InvalidCastException
error to be thrown when passingObjectCollection
toAddRangeInternal
of theDataGridViewComboBoxCell.ObjectCollection
class, by:AddRange(ObjectCollection value)
methodAddRangeInternal(ObjectCollection items)
methodsCustomer Impact
System.InvalidCastException
Regression?
Risk
Screenshots
Before
After
Test methodology
Accessibility testing
Test environment(s)
10.0.100-alpha.1.24573.1
Microsoft Reviewers: Open in CodeFlow