-
Notifications
You must be signed in to change notification settings - Fork 957
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
Implement the ITypeDiscoveryService service #10247
Implement the ITypeDiscoveryService service #10247
Conversation
src/System.Windows.Forms.Design/src/System/ComponentModel/Design/TypeDiscoveryService.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Design/src/System/ComponentModel/Design/TypeDiscoveryService.cs
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
Looks good, I added one minor comment.
....Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/TypeDiscoveryService.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/TypeDiscoveryService.cs
Outdated
Show resolved
Hide resolved
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!
Fixes #9870
Proposed changes
ServiceContainer
of IDesignerHostRoot cause of this issue:
PopulateColumnTypesCombo
function, the code attempts to obtain anITypeDiscoveryService
instance through the GetService method ofIDesignerHost
in order to discover all subtypes ofDataGridViewColumn
.However, because
ITypeDiscoveryService
is not added in the default service containerServiceContainer
ofIDesignerHost
,GetService
returns null.winforms/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewAddColumnDialog.cs
Lines 657 to 673 in 1d604b5
Customer Impact
Risk
Screenshots
Before
The column type is empty
![image](https://private-user-images.githubusercontent.com/132890443/281347282-30d3bd42-5617-4d50-aa0d-907e0429cccc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4NDQ3NTUsIm5iZiI6MTcyMDg0NDQ1NSwicGF0aCI6Ii8xMzI4OTA0NDMvMjgxMzQ3MjgyLTMwZDNiZDQyLTU2MTctNGQ1MC1hYTBkLTkwN2UwNDI5Y2NjYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxM1QwNDIwNTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMmRmZTdkZGFlMWYyZjUzODJlZjk5YWU4ZjBkZGUzM2RiOTFlODNmOTJiMTUxMmFkYTYyZTg4NTMwYTM3NjRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.7xSogcqE1Yunr3uVHk2L4whh3mBhnAbiob7ZOvOltjU)
After
The DataGridView column can be added normally from the Add column page
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow