From d51fa0e8c3c2e11a4b9828e7e27639cfa67e5fa5 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 20 Nov 2025 06:53:09 -0500 Subject: [PATCH 1/2] Access modifiers for cascading params (#36362) --- .../blazor/components/cascading-values-and-parameters.md | 6 ++++-- .../class-libraries-and-static-server-side-rendering.md | 2 +- aspnetcore/blazor/components/httpcontext.md | 2 +- aspnetcore/blazor/fundamentals/handle-errors.md | 6 +++--- aspnetcore/blazor/fundamentals/routing.md | 2 +- aspnetcore/blazor/globalization-localization.md | 4 ++-- aspnetcore/blazor/hybrid/root-component-parameters.md | 2 +- aspnetcore/blazor/security/content-security-policy.md | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/aspnetcore/blazor/components/cascading-values-and-parameters.md b/aspnetcore/blazor/components/cascading-values-and-parameters.md index 09a8e69d20ef..68c0a96128fa 100644 --- a/aspnetcore/blazor/components/cascading-values-and-parameters.md +++ b/aspnetcore/blazor/components/cascading-values-and-parameters.md @@ -241,7 +241,7 @@ The following component is used to demonstrate how changing the value of `Notify private int dalekCount; [CascadingParameter] - public NotifyingDalek? Dalek { get; set; } + private NotifyingDalek? Dalek { get; set; } private void Update() { @@ -433,6 +433,8 @@ For more information, see the following sections of this article: To make use of cascading values, descendent components declare cascading parameters using the [`[CascadingParameter]` attribute](xref:Microsoft.AspNetCore.Components.CascadingParameterAttribute). Cascading values are bound to cascading parameters **by type**. Cascading multiple values of the same type is covered in the [Cascade multiple values](#cascade-multiple-values) section later in this article. +The `private` access modifier is recommended for cascading parameters because the parameter should be scoped for use only within the component's class in most cases. When subclassing is required, use the `protected` access modifier. + The following component binds the `ThemeInfo` cascading value to a cascading parameter, optionally using the same name of `ThemeInfo`. The parameter is used to set the CSS class for the **`Increment Counter (Themed)`** button. `ThemedCounter.razor`: @@ -657,7 +659,7 @@ Descendent `Tab` components capture the containing `TabSet` as a cascading param @code { [CascadingParameter] - public TabSet? ContainerTabSet { get; set; } + private TabSet? ContainerTabSet { get; set; } [Parameter] public string? Title { get; set; } diff --git a/aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md b/aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md index e5699f5be141..655ac45d200b 100644 --- a/aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md +++ b/aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md @@ -125,7 +125,7 @@ Reusable components are free to receive an Date: Thu, 20 Nov 2025 14:16:30 -0500 Subject: [PATCH 2/2] Import inputs into env (#36380) * Import inputs into env Instead of raw input from workflow_dispatch, import those inputs into the environment before using. * Apply suggestions from code review --- .github/workflows/quest-bulk.yml | 4 +++- .github/workflows/quest.yml | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quest-bulk.yml b/.github/workflows/quest-bulk.yml index 60db1feaeaff..a3c2d7b6d3d8 100644 --- a/.github/workflows/quest-bulk.yml +++ b/.github/workflows/quest-bulk.yml @@ -27,7 +27,9 @@ jobs: - name: "Print manual bulk import run reason" if: ${{ github.event_name == 'workflow_dispatch' }} run: | - echo "Reason: ${{ github.event.inputs.reason }}" + echo "Reason: $REASON" + env: + REASON: ${{ github.event.inputs.reason }} - name: Azure OpenID Connect id: azure-oidc-auth diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml index af869c31b542..4e6c1dc0a2e9 100644 --- a/.github/workflows/quest.yml +++ b/.github/workflows/quest.yml @@ -28,9 +28,12 @@ jobs: - name: "Print manual run reason" if: ${{ github.event_name == 'workflow_dispatch' }} run: | - echo "Reason: ${{ github.event.inputs.reason }}" - echo "Issue number: ${{ github.event.inputs.issue }}" - + echo "Reason: $REASON" + echo "Issue number: $ISSUENUMBER" + env: + REASON: ${{ github.event.inputs.reason }} + ISSUENUMBER: ${{ github.event.inputs.issue }} +I - name: Azure OpenID Connect id: azure-oidc-auth uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@main