Skip to content
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

CA and CDI support for manifest resources #418

Merged
merged 3 commits into from
Aug 4, 2021

Conversation

ElektroKill
Copy link
Contributor

Add support for reading and writing Custom Attributes and Custom Debug Infos for manifest resources.

@ElektroKill
Copy link
Contributor Author

I've implemented reading in the best way I could think of that matches the implementation for other members and doesn't introduce any API changes except for the fact that EmbeddedResource, AssemblyLinkedResource, and LinkedResource are no longer sealed due to inheritance being required by the MD variants of them. If there is any way to prevent the non-internal inheritance of a class in this particular case I would be willing to hear about it and implement it.

@ElektroKill ElektroKill marked this pull request as ready for review August 3, 2021 18:10
@wtfsck
Copy link
Contributor

wtfsck commented Aug 4, 2021

If there is any way to prevent the non-internal inheritance of a class in this particular case I would be willing to hear about it and implement it.

I don't think it's possible so nothing to do about it.

Have you tested this with some assembly that has resources with CAs and/or CDIs?

@ElektroKill
Copy link
Contributor Author

Yes I have indeed tested this by loading an assembly with resources with dnlib, adding a custom attribute to one of the resources, writing to disk, loading this newly written assembly and checking if the custom attribute is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants