Apply suggestions from code review
Apply suggestions from code review

Co-Authored-By: Andrew Stanton-Nurse <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@stanton-nurse.com>\n\nCommit migrated from https://github.com/dotnet/extensions/commit/c79268ee19fd3d81d312822d4abc8574a1629f9b

aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore