-
Notifications
You must be signed in to change notification settings - Fork 5k
[SRM] Add APIs to get the AssemblyNameInfo
of an assembly definition or reference.
#116839
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds new APIs to obtain an AssemblyNameInfo instance from both assembly definitions and assembly references, complementing the existing GetAssemblyName API. The changes include implementation updates in the core libraries and corresponding tests validating the new API behavior.
- Adds GetAssemblyNameInfo methods to AssemblyReference and AssemblyDefinition.
- Enhances MetadataReader to construct AssemblyNameInfo from metadata.
- Updates tests in AssemblyDefinitionTests.cs to validate AssemblyNameInfo properties.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/libraries/System.Reflection.Metadata/tests/Metadata/TypeSystem/AssemblyDefinitionTests.cs | Adds tests validating AssemblyNameInfo for both definitions and references. |
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/AssemblyReference.netstandard.cs | Introduces GetAssemblyNameInfo API for assembly references with proper XML documentation. |
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/AssemblyDefinition.netstandard.cs | Introduces GetAssemblyNameInfo API for assembly definitions with proper flag handling. |
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataReader.netstandard.cs | Adds a new method to create AssemblyNameInfo from metadata components. |
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/AssemblyNameInfo.cs | Updates using directives to include System.IO as part of AssemblyNameInfo. |
src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs | Updates the reference assemblies to include the new GetAssemblyNameInfo API. |
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata |
c116db0
to
7bb24e6
Compare
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/AssemblyNameInfo.cs
Outdated
Show resolved
Hide resolved
…/Metadata/AssemblyNameInfo.cs
Fixes #113749.