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

Fix AOT warning with HtmlNode.GetAttributeValue #573

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

euju-ms
Copy link
Contributor

@euju-ms euju-ms commented Oct 30, 2024

T HtmlNode.GetAttributeValue<T>(string name, T def) is not AOT compatible because it calls into an extension method Utilities.To (which is also not AOT compatible).

This PR makes T HtmlNode.GetAttributeValue<T>(string name, T def) obsolete, and adds an overload for GetAttributeValue that takes in an additional parameter parser for converting the string attribute value into type T.

All the internal usages are converted to use the new API.

@euju-ms euju-ms mentioned this pull request Oct 30, 2024
@euju-ms
Copy link
Contributor Author

euju-ms commented Nov 6, 2024

@JonathanMagnan Do you think we can proceed with this PR? I'm just trying to figure out my options :)

@JonathanMagnan
Copy link
Member

Hello @euju-ms ,

Sorry, I forgot to answer.

I'm currently on vacation this week in Mexico. So, I will look at it next week when I will be back.

Best Regards,

Jon

@JonathanMagnan JonathanMagnan merged commit 2a6af61 into zzzprojects:master Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants