-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Static logging delegates nested inside generic types #31340
Comments
Happy to pick this up - in #31345 I've already refactored |
Other than the two already mentioned in #31333, I also found these two which I can fix up at the same time:
aspnetcore/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.Log.cs Lines 11 to 13 in c0d17cf
|
Oh - I see you've already done it in #31345 - I was already in the middle of doing it from this comment #31333 (comment), but happy for you to do it instead. |
I can also cover the two cases mentioned by you and scan project for similar problems. I'll wait to become an assignee to this issue to continue work ;) |
I did a search in VS Code across the whole ASP.NET Core solution for I hadn't started on changing those two yet, so feel free to make the change yourself 🙂 |
Feel free to pick up the ones in SignalR as well. |
Done via #31364 |
Static logging delegates will allocate a new copy for each generic type.
See #31333 (comment)
Should audit for all usages of static logging delegates to see if there are other places they are nested in generic types.
Before:
After:
Edit: That won't work because Log will be private. How about
internal static class RequestContextLog
with no nested Log type.The text was updated successfully, but these errors were encountered: