This repository has been archived by the owner on May 15, 2024. It is now read-only.
[Enhancement] Use throwhelper in argument validation scenarios to be more inline friendly and reduce code size and improve generation #1415
Labels
feature-request
A request for a new feature.
Summary
Throw expressions are relatively expensive size wise, and may be the reason the method is not inlined. For such cases we might consider adding a throwhelper as we currently use for the netstandard notsupported messages.
API Changes
None, everything is internal. We would simply add a level of indirection to the throwhelper which will never be inlined and thus reduce the overall binary size
Intended Use Case
See the SR class in the dotnet/runtime repository, containing messages used to pass to a throwhelper. For a sample application see Barometer.shared.cs where both of the exceptions could be contained in a throwhelper
The text was updated successfully, but these errors were encountered: