-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refactor DesignerSerializationManager
to replace HashTable
and enable Nullability
#8353
Refactor DesignerSerializationManager
to replace HashTable
and enable Nullability
#8353
Conversation
@RussKie, should |
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
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.
There seems to be a bug in the original code. Otherwise, mostly about cleaning up some old comments
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
I think that |
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.
Small comment on whether a null check can be removed, otherwise LGTM!
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Outdated
Show resolved
Hide resolved
Looking at source code it may need to be addressed in TypeDescriptorProvider. I believe runtime owns TypeDescriptor. Feel free to raise in issue. |
@lonitra I'm digging through runtime now. |
Thanks for doing that! |
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 LGTM :) but looks like we have some build errors. If you build on command line (cd to winforms repo on command line and type 'build') these errors should show up
Thanks, some of the build errors are related to the winforms PRs. I'll check over it again. |
f6e5d1c
to
23570a8
Compare
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Show resolved
Hide resolved
Do we add exception information to XML comments? |
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Show resolved
Hide resolved
....Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs
Show resolved
Hide resolved
Sorry, I'm not sure I follow. Which XML comments? |
…d to check for IList instead of ArrayList
deeae48
to
3df6086
Compare
I apologize for the rebase/force push. Test should be fixed now. |
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 for your persistence on this!
Thanks, I hope that the rest of the code base doesn't take me 2 months per code file. |
I was looking at the source code and I think this PR caused a bug here: Lines 421 to 429 in 2681167
When |
I'll try and put in a pr to fix it soon. |
The same may apply to other hashtables such as namesByInstance. |
Thank you @KalleOlaviNiemitalo for pointing this out. @elachlan, lets take a look at these on case by case. |
Refactored to replace HashTable
Refactored for null-ability annotations
General code cleanup
Dependent on runtime changes in:
IDesignerSerializationManager
nullability runtime#79429CreateInstance
inTypeDescriptor
/TypeDescriptionProvider
to matchActivator.CreateInstance
runtime#79776IDesignerSerializationProvider.GetSerializer
runtime#81203Related: #8342, #8143
Microsoft Reviewers: Open in CodeFlow