-
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
[Blazor] Rename ComponentPlatform to RendererInfo #56263
[Blazor] Rename ComponentPlatform to RendererInfo #56263
Conversation
d0b90cc
to
c1cfe2e
Compare
/// <summary> | ||
/// Gets the name of the platform. | ||
/// </summary> | ||
public string Name { get; } = rendererName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just academic, but I'm curious how this differs from:
public string Name => rendererName;
I would have thought doing it like this reduces the amount of storage required since we're reading the primary constructor's generated field directly instead of copying it into another field on construction, but maybe the compiler optimizes it to be the same regardless.
Not a big deal but if you happen to know then I'm interested!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler optimizes that afaik.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was curious and checked; the generated code is virtually identical. In both cases there's only one backing field.
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Renames as per #56047 (comment)
Fixes #56047