Skip to content
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 - make parameters forced public #12776

Closed
harleydk opened this issue Jul 31, 2019 · 2 comments
Closed

Blazor - make parameters forced public #12776

harleydk opened this issue Jul 31, 2019 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@harleydk
Copy link

harleydk commented Jul 31, 2019

I would like to suggest component parameters with getter and setter qualifications, as per https://docs.microsoft.com/en-us/aspnet/core/blazor/components?view=aspnetcore-3.0#lifecycle-methods should be public, as opposed to:

@code {
    [Parameter]
    private bool IsCompleted { get; set; }
}

Or ditch the getter and setter altogether. I fully realize it's a matter of my personal preference and this likely won't go further, yet would like to state a case for the 'public' encapsulation referring to a front-facing element, such as these kind of Blazor parameters. The above feels and looks odd, IMPO.

@Eilon Eilon added the area-blazor Includes: Blazor, Razor Components label Jul 31, 2019
@stsrki
Copy link
Contributor

stsrki commented Aug 1, 2019

This is going to be covered by #8825

@harleydk
Copy link
Author

harleydk commented Aug 1, 2019

Thank you @stsrki , I did look for a similar topic but not good enough.

@harleydk harleydk closed this as completed Aug 1, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

3 participants