Sync shared code from runtime (#39453)
Sync shared code from runtime (#39453)

Co-authored-by: Tratcher <17a1bcfb12b91d5a94bc2a853ed1356b563f4b10@users.noreply.github.com>
aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore