-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Avoid dictionary lookup for singleton services #52035
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
Changes from all commits
945c4e0
27fb9e8
ae637b6
f4d8d38
b891ae1
345c0b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
namespace Microsoft.Extensions.DependencyInjection.ServiceLookup | ||
{ | ||
internal struct ServiceCacheKey: IEquatable<ServiceCacheKey> | ||
internal readonly struct ServiceCacheKey : IEquatable<ServiceCacheKey> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not directly related to your changes, but the HashCode calculation will throw for the static There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do that in a different PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I created #52115 to fix that nullref exception. |
||
{ | ||
public static ServiceCacheKey Empty { get; } = new ServiceCacheKey(null, 0); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.