-
Notifications
You must be signed in to change notification settings - Fork 983
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 nullability in DesignerFrame and clean it up #9966
Conversation
LGTM! |
ISelectionService selSvc = (ISelectionService)_designerSite.GetService(typeof(ISelectionService)); | ||
if (selSvc is not null) | ||
ISelectionService? selSvc = _designerSite.GetService<ISelectionService>(); | ||
if (selSvc?.PrimarySelection is Control { IsDisposed: false } ctrl) |
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.
we need consistency in adapting this syntax standard. Will get this reviewed collectively and make decision across the PRs.
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.
I'm happy to rollback such changes if it's a contentious issue. Here it doesn't add much to the table anyway.
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.
Not yet. Will update here if needed. We just need consistency in adapting these.
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.
We are preferring pattern matching wherever possible. While we do not expect or encourage community to do a pass specifically for the pattern matching on the existing code, if you happen to be working on the code as part of some other fix, identify an opportunity to incorporate pattern matching, we take it.
Proposed changes
ArrayList
s withList<T>
s inDesignerFrame
(contributes to ConvertArrayList
usage toList<T>
where possible #8140)DesignerFrame
DesignerFrame
and one call siteMicrosoft Reviewers: Open in CodeFlow