-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add design usage notes to TypeMapAttribute and TypeMapAssociationAttribute documentation #12107
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
Add design usage notes to TypeMapAttribute and TypeMapAssociationAttribute documentation #12107
Conversation
…ute documentation Co-authored-by: AaronRobinsonMSFT <[email protected]>
Co-authored-by: AaronRobinsonMSFT <[email protected]>
Co-authored-by: AaronRobinsonMSFT <[email protected]>
xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml
Outdated
Show resolved
Hide resolved
xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml
Outdated
Show resolved
Hide resolved
xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml
Outdated
Show resolved
Hide resolved
Co-authored-by: AaronRobinsonMSFT <[email protected]>
Co-authored-by: AaronRobinsonMSFT <[email protected]>
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 comprehensive design documentation to the TypeMapAttribute<TTypeMapGroup> and TypeMapAssociationAttribute<TTypeMapGroup> classes, documenting their trimming behavior based on the runtime design specification. The documentation clarifies how these attributes influence trimming logic for interop scenarios.
Key changes:
- Added detailed Remarks sections explaining External Type Map and Proxy Type Map behavior during trimming
- Documented specific IL instructions that trigger map entry inclusion (e.g.,
ldtoken,unbox,isinst,castclass,box,newarr,newobj) - Fixed a typo in the TypeMapAttribute constructor parameter description ("kthe" → "the")
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml | Adds Remarks section documenting unmanaged-to-managed interop type mapping behavior, lists IL instructions triggering External Type Map inclusion, and fixes typo in constructor parameter |
| xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml | Adds Remarks section documenting managed-to-unmanaged interop proxy type associations, lists IL instructions triggering Proxy Type Map inclusion, and explains special handling for interface types with IDynamicInterfaceCastable |
xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml
Outdated
Show resolved
Hide resolved
|
/cc @gewarren |
AaronRobinsonMSFT
left a comment
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.
@copilot Please apply comment feedback.
xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml
Outdated
Show resolved
Hide resolved
Co-authored-by: AaronRobinsonMSFT <[email protected]>
gewarren
left a comment
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.
lgtm
|
Looks like there is some formatting issues. I'll put up another PR and fix them up. |
TypeMapAttribute<TTypeMapGroup>class documentation with:TypeMapAssociationAttribute<TTypeMapGroup>class documentation with:Original prompt
TypeMapAttribute/TypeMapAssociationAttributeAdd design usage notes to documentation #12102✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.