-
Notifications
You must be signed in to change notification settings - Fork 247
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
Allow visualization of properties on generic types #1472
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
33dc362
Use temporary local impl of winmd lib
DefaultRyan b63aef1
Partial plumbing
DefaultRyan 50e9869
Synthesizing GenericTypeInstSig and generating guid
DefaultRyan d222652
Generic property visualization is working
DefaultRyan e436ad2
Handle generics in InterfaceImpl
DefaultRyan 39cf543
Bring local winmd changes up to date with official
DefaultRyan 3f0895e
Try to clean some analysis warnings.
DefaultRyan 34fcbb6
Write template brackets
DefaultRyan 8e44c6f
Remove unused struct
DefaultRyan 7be5707
Fix incorrect FindSimpleType
DefaultRyan a20fba7
Move from local prototype of winmd nuget to new official version
DefaultRyan 333b7cb
No need for natvis namespace now that db was renamed to db_cache
DefaultRyan 9855edf
npos
DefaultRyan 45c7daf
Handle Char16 in generic params
DefaultRyan 3ca0940
Enable Guid in generic type param
DefaultRyan e3c5189
Use IPropertyValue.GetGuid() instead of PropertyValue.CreateGuid()
DefaultRyan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this need to be case insensitive?
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's a good question, and I had to really think about this answer. From everything I've learned about WinRT over the years, the exact casing of the string returned by
GetRuntimeClassName
is not prescribed by the type system, just that "In particular, IInspectable.GetRuntimeClassName enables an object's client to retrieve a WinRT typename that can be resolved in metadata to enable language projection." (source https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-system)That same WinRT type system doc linked above also calls out the names of these fundamental types, so these exact strings are standard, with the exception of
Object
. What isn't strictly specified in the standard is that an implementation's internal type for a generic must return a particular string fromGetRuntimeClassName
.With a concrete type that implements generic interfaces, like
Windows.Foundation.Collections.ValueSet
, it only needs to return that string. After looking up that string in the winmd, the relationship of the runtime class to the various generic interfaces it implements is all captured in the ECMA metadata.But with these implementation-supplied objects, the class name is more of a convention, rather than a dictate of the type system, as far as I can tell. But what I do know is that I checked 3 of the big implementations that actually generate matching pinterface GUIDs and runtime class names, and they all use these same names. So, I think we're good here.
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 did just notice that I need to validate
Char16
andGuid
. I'm also going to ping the CsWinRT owners to verify they also return consistent strings for these cases.