Skip to content

Fix AOT warning with HtmlNode.GetAttributeValue#573

Merged
JonathanMagnan merged 2 commits intozzzprojects:masterfrom
euju-ms:aot
Nov 11, 2024
Merged

Fix AOT warning with HtmlNode.GetAttributeValue#573
JonathanMagnan merged 2 commits intozzzprojects:masterfrom
euju-ms:aot

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