-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add TypeName APIs to simplify metadata lookup.
#111598
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
Merged
jkotas
merged 37 commits into
dotnet:main
from
teo-tsirpanis:typename-namespace-unescape
Feb 10, 2025
Merged
Changes from 25 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
a573f96
Add `TypeName.Namespace` and tests.
teo-tsirpanis dfe213f
Add `TypeName.Unescape`.
teo-tsirpanis 2037805
Fix infinite loops.
teo-tsirpanis d0c0e02
Simplify loop.
teo-tsirpanis 3567d78
Update reference assembly.
teo-tsirpanis afc4cb1
Address PR feedback around `Unescape`.
teo-tsirpanis dde6eda
Remove file with duplicate `Unescape` method.
teo-tsirpanis 1da808a
Fix tests.
teo-tsirpanis ae14c6a
Reduce allocations when calling `Namespace` across a type name hierachy.
teo-tsirpanis 0b03353
Fix nested types with namespaces.
teo-tsirpanis 41d2f7c
Add tests for `Unescape`.
teo-tsirpanis 1e3f969
Fix compile errors.
teo-tsirpanis 269d0cc
Restore `TypeNameHelpers` and use it in all places except CoreLib.
teo-tsirpanis 9548bee
Merge branch 'main' into typename-namespace-unescape
teo-tsirpanis 94441e7
Do not omit escape character at the end when unescaping.
teo-tsirpanis c98beec
Return the namespace of the innermost nested type that has one.
teo-tsirpanis 3763dbe
Update `TypeName.Name` to return the whole name of nested types.
teo-tsirpanis 00c0ab7
Remove unnecessary `ValueStringBuilder.Dispose`.
teo-tsirpanis 999d4e4
Update `GetNamespace` to fail if a nested type has a namespace.
teo-tsirpanis 2885d4c
Remove support for nested types and escaped dots in namespaces.
teo-tsirpanis c84c41e
Remove support for escaped dots in `GetName`, and optimize it if the …
teo-tsirpanis fa7b459
Update tests.
teo-tsirpanis a6100e7
Simplify `Name` to avoid linear search of the full name in nested types.
teo-tsirpanis ae3b7e2
[mono] Do not treat nested type names as full names.
teo-tsirpanis d618093
Fix compile errors.
teo-tsirpanis 82e156f
Update algorithm to find namespace delimiter.
teo-tsirpanis 0d220f2
Revert nullable annotations changes.
teo-tsirpanis e1f044c
Redirect all `Type.GetType` overloads in Mono through `TypeNameResolv…
teo-tsirpanis a3bf79d
Update tests to account for Mono using the managed type parser in `Ty…
teo-tsirpanis c023336
Disallow getting the namespace of non-simple nested type names.
teo-tsirpanis cb2bd2d
Ignore ambiguous match exceptions in non-extensible `Type.GetType` ov…
teo-tsirpanis 02c2efe
Set `TypeLoadException.TypeName` in Mono as well.
teo-tsirpanis ed19a97
Update src/libraries/System.Reflection.Metadata/tests/Metadata/TypeNa…
teo-tsirpanis 0325ce1
Merge branch 'main' into typename-namespace-unescape
teo-tsirpanis b924a6f
Use alternative strategy to provide a `(message, typeName)` overload …
teo-tsirpanis c55b487
Address PR feedback.
teo-tsirpanis 7378b4a
Update src/libraries/System.Reflection.Metadata/src/System/Reflection…
jkotas 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.