Skip to content

Public access modifier for [PersistentState] props#37003

Merged
guardrex merged 12 commits intomainfrom
guardrex-patch-1
Apr 16, 2026
Merged

Public access modifier for [PersistentState] props#37003
guardrex merged 12 commits intomainfrom
guardrex-patch-1

Conversation

@guardrex
Copy link
Copy Markdown
Collaborator

@guardrex guardrex commented Apr 15, 2026

Fixes #37002

Wade, Tom ... Just need one review on this one.

This is to emphasize that we want devs to use public props, per Javier's remarks.

All of the code is correct, both here and in the Blazor sample apps. We just need to call it out explicitly.

BONUS: I ended up agreeing with CoPilot that we should code-fence the access modifier public. I did it for the content addressed for the issue and for other places that I found around the repo. Because the changes are so small, I didn't sweat updating the article dates, except for the release notes page (required to suck in the new Blazor INCLUDES file content).


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/components/integration.md aspnetcore/blazor/components/integration
aspnetcore/blazor/forms/index.md aspnetcore/blazor/forms/index
aspnetcore/blazor/state-management/prerendered-state-persistence.md aspnetcore/blazor/state-management/prerendered-state-persistence
aspnetcore/blazor/state-management/server.md aspnetcore/blazor/state-management/server
aspnetcore/blazor/tutorials/movie-database-app/part-5.md aspnetcore/blazor/tutorials/movie-database-app/part-5
aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg006.md aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg006
aspnetcore/fundamentals/http-requests.md aspnetcore/fundamentals/http-requests
aspnetcore/fundamentals/openapi/include-metadata.md aspnetcore/fundamentals/openapi/include-metadata
aspnetcore/mvc/models/model-binding.md aspnetcore/mvc/models/model-binding
aspnetcore/release-notes/aspnetcore-10.0.md aspnetcore/release-notes/aspnetcore-10.0

@guardrex guardrex self-assigned this Apr 15, 2026

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Emphasizes that [PersistentState] should be applied to public properties (per linked framework guidance) and updates related docs to format and call out public access consistently.

Changes:

  • Update Blazor docs and .NET 10 release notes to explicitly call out public properties for [PersistentState].
  • Apply similar public keyword formatting updates across several docs where “public properties” are referenced.
  • Update aspnetcore-10.0.md front matter ms.date to the current date.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
aspnetcore/release-notes/aspnetcore-10/includes/blazor.md Calls out public properties for [PersistentState] and adds rationale note.
aspnetcore/release-notes/aspnetcore-10.0.md Updates ms.date metadata.
aspnetcore/mvc/models/model-binding/includes/model-binding7.md Formats public keyword references in model-binding includes.
aspnetcore/mvc/models/model-binding.md Formats public keyword references in model-binding article.
aspnetcore/fundamentals/openapi/includes/include-metadata9.md Formats public keyword reference for schema generation behavior.
aspnetcore/fundamentals/openapi/includes/include-metadata10.md Formats public keyword reference for schema generation behavior.
aspnetcore/fundamentals/openapi/include-metadata.md Formats public keyword reference for schema generation behavior.
aspnetcore/fundamentals/http-requests.md Formats public keyword references in typed client explanation.
aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg006.md Formats public keyword reference in diagnostic description.
aspnetcore/blazor/tutorials/movie-database-app/part-5.md Formats public keyword reference in validation section.
aspnetcore/blazor/state-management/server.md Calls out public component/service properties for circuit state persistence.
aspnetcore/blazor/state-management/prerendered-state-persistence.md Calls out public properties for prerendered state persistence and adds rationale note.
aspnetcore/blazor/forms/index.md Formats public keyword references in forms explanations.
aspnetcore/blazor/components/integration.md Calls out public property usage for [PersistentState] integration scenario.

Comment thread aspnetcore/blazor/state-management/prerendered-state-persistence.md Outdated
Comment thread aspnetcore/blazor/state-management/server.md
Comment thread aspnetcore/blazor/state-management/server.md Outdated
Comment thread aspnetcore/blazor/state-management/prerendered-state-persistence.md Outdated
Comment thread aspnetcore/blazor/state-management/prerendered-state-persistence.md Outdated
guardrex and others added 3 commits April 15, 2026 14:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@guardrex guardrex mentioned this pull request Apr 15, 2026
67 tasks
Copy link
Copy Markdown
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@guardrex guardrex removed the request for review from tdykstra April 16, 2026 16:59
@guardrex guardrex merged commit f2a0329 into main Apr 16, 2026
4 checks passed
@guardrex guardrex deleted the guardrex-patch-1 branch April 16, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emphasize that the [PersistentState] property should be public

3 participants