[11.0 P6] Blazor Preview 6 coverage#37322
Conversation
There was a problem hiding this comment.
Pull request overview
Updates ASP.NET Core documentation for .NET 11 Preview 6, focusing on C# union types coverage across Blazor, SignalR, MVC, and Minimal APIs, and aligning union-type links with current C# reference material.
Changes:
- Update several union-type references to point to the C# union type language reference.
- Add/expand Blazor guidance for union types (component parameters,
DynamicComponentboxing, JS interop support note, and a PCS/serialization caveat). - Refresh article metadata dates where substantial content was added/updated.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| aspnetcore/signalr/hubs.md | Updates the union types link used in the SignalR JsonHubProtocol note. |
| aspnetcore/release-notes/aspnetcore-11/includes/csharp-unions-preview-6.md | Adds a language-reference cross-link for union types in the .NET 11 Preview 6 release notes include. |
| aspnetcore/mvc/models/model-binding.md | Updates union types link in the model-binding note about [FromBody] support. |
| aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md | Updates union types link in Minimal API parameter binding note. |
| aspnetcore/blazor/state-management/prerendered-state-persistence.md | Adds a .NET 11 note about JsonSerializerContext not flowing into union deserialization; updates metadata date. |
| aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md | Adds a .NET 11 note that union types are supported; updates metadata date. |
| aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md | Adds a .NET 11 note that union types are supported; updates metadata date. |
| aspnetcore/blazor/fundamentals/routing.md | Updates union types link in the note about route parameters not supporting unions. |
| aspnetcore/blazor/fundamentals/navigation.md | Updates union types link in the note about [SupplyParameterFromQuery]/[SupplyParameterFromForm] not supporting unions. |
| aspnetcore/blazor/components/index.md | Adds union-typed component parameter guidance + examples and updates metadata (including ai-usage). |
| aspnetcore/blazor/components/dynamiccomponent.md | Adds guidance and examples for boxing union-typed parameters passed via DynamicComponent dictionaries; updates metadata date. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@guardrex, just a heads up I will be unavailable from 7/10 Friday (tomorrow), all through next week until 7/21. So look to @tdykstra for any reviews you need here or on the samples repo, etc. @tdykstra is also handling the What's New. I'll start a draft today but he will be responsible for updates to keep in sync with any release note updates. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
I'm only focusing the Blazor updates that pertain to automatic CSRF middleware on the Blazor articles. I have a couple of questions and observations on the new CSRF Protection Middleware coverage. Note that I'm going by conventions that were established years ago for the repo, but those conventions might have been dropped. I hope to get some clarity on that subject separately later. Anyway ........
|
This comment was marked as outdated.
This comment was marked as outdated.
|
Following up on the browser-options coverage: I confirmed the C# server-side What it is: it configures client-side Blazor startup from the server in C# (client log level, interactive Server reconnection, SSR DOM preservation, and the WebAssembly environment name/culture/variables) instead of hand-writing We wrote it up for the Preview 6 release notes — see the "Configure Blazor client behavior from the server" section in dotnet/core#10455 ( Example: app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.WithBrowserOptions(options =>
{
options.LogLevel = LogLevel.Warning;
options.Server.ReconnectionMaxRetries = 10;
options.Ssr.PreserveDom = true;
options.WebAssembly.EnvironmentVariables["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://localhost:4318";
});You can also set these from a component with |
|
@danroth27 ... UPDATE: Yes, let me try to resolve the reference article coverage by EOD (UPDATE: by EOD Wednesday b/c we didn't get release coverage released on Tuesday) as opposed to by release in a few hours. I just placed the What's New coverage, so we'll have that for release. I'd like to get the other high priority coverage here fixed up for release first. |
Reviewing dotnet/AspNetCore.Docs#37322 surfaced that the attribute is data-blazor-virtualize-reserved-height (only the server-computed spacer height), not the generic data-blazor-style. Verified in the P6 source (Virtualize.cs / Virtualize.ts). @ilonatommy corrected the same wording on the docs PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
A few answers on the open questions:
|
|
|
We're in mostly good shape here. I need to get the reference coverage for Configure Blazor client behavior from the server in place later today. We have it covered in What's New here for now. I still need feedback on the CSRF Protection Middleware coverage. My remarks are above at ... |
|
Thanks, @guardrex! Answers to your questions:
|
|
* [release-notes] .NET 11 Preview 6 base metadata changes.json, features.json, build-metadata.json, and README for the .NET 11 Preview 6 milestone (VMR base v11.0.0-preview.5.26302.115 -> head release/11.0.1xx-preview6). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [release-notes] C# in .NET 11 Preview 6 (#10460) * [release-notes] C# in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update release-notes/11.0/preview/preview6/csharp.md --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Bill Wagner <wiwagn@microsoft.com> * [release-notes] MSBuild in .NET 11 Preview 6 (#10463) * [release-notes] MSBuild in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add bug-fix note for architecture-agnostic Runtime=NET task host handshake (dotnet/msbuild#13890) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Remove HTML comments from Preview 6 MSBuild release notes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Chet Husk <chusk3@gmail.com> * [release-notes] NuGet in .NET 11 Preview 6 (#10464) * [release-notes] NuGet in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix STJ feature-flag env var value and remove VS reference Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Chet Husk <chusk3@gmail.com> * [release-notes] .NET SDK in .NET 11 Preview 6 (#10459) * [release-notes] .NET SDK in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Clarify NativeAOT CLI updates in preview6/sdk.md Updated the NativeAOT CLI section to clarify the unification of managed and NativeAOT parsers, and removed filtered content related to internal changes. * Add live running-tests display to dotnet test notes Document the in-flight test progress panel (dotnet/sdk#54486) and fix pre-existing trailing-space lint errors in the NativeAOT section. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Chet Husk <baronfel@users.noreply.github.com> Co-authored-by: Chet Husk <chusk3@gmail.com> * [release-notes] Windows Forms in .NET 11 Preview 6 (#10465) * [release-notes] Windows Forms in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revise Windows Forms release notes for Preview 6 Updated release notes for .NET 11 Preview 6 to include bug fixes and improvements for various Windows Forms components. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com> * [release-notes] .NET MAUI in .NET 11 Preview 6 (#10467) * [release-notes] .NET MAUI in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Draft .NET MAUI and friends notes for .NET 11 Preview 6 Combined highlights for .NET MAUI, .NET for Android, and .NET for iOS, Mac Catalyst, macOS, and tvOS: CollectionView2 on Windows, handler-based Shell on Android, Compatibility package removal, AOT-safe HybridWebView, Geolocation minimum-distance filter, a reliability wave, the AndroidMessageHandler HTTP-contract work, and the Apple platform toolchain and NSUrlSessionHandler updates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add Preview 6 items from MAUI maintainer review Incorporates jfversluis review feedback on #10467: - Android MediaPicker result recovery APIs (dotnet/maui#35455) - HybridWebView Android message-source filtering (dotnet/maui#35717) - XAML C# expression source generator CS1061 fix (dotnet/maui#35922) - Testable permissions via IPermissions/Permissions.Current (dotnet/maui#35987) - XA0149 warning for legacy __AndroidEnvironment__ resources (dotnet/android#11700) - Skip library proguard.txt with disallowed R8 global options (dotnet/android#11709) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Ortinau <david.ortinau@microsoft.com> * [release-notes] EF Core in .NET 11 Preview 6 (#10462) Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> * [release-notes] F# in .NET 11 Preview 6 (#10461) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [release-notes] Containers in .NET 11 Preview 6 (#10468) * [release-notes] Containers in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update release notes --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Logan Bussell <loganbussell@microsoft.com> * [release-notes] .NET Libraries in .NET 11 Preview 6 (#10457) * [release-notes] .NET Libraries in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix async DataAnnotations sample after testing on the Preview 6 SDK AsyncValidationAttribute is overridden via the protected IsValidAsync (and IsValid) members, not GetValidationResultAsync (which is the public method the framework calls and is not virtual). Verified the corrected sample compiles and runs against the Preview 6 build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Verify Preview 6 library samples and fix inaccuracies - Stream adapters: read from the read-only stream via StreamContent/PostAsync instead of copying HttpContent into it - Cross-lane vectors: replace nonexistent Concat with ConcatLowerLower/LowerUpper/UpperLower/UpperUpper and drop preexisting Shuffle/ShuffleNative - Async validation: swap the unique-username example for a VAT registry lookup, layer StringLength and RegularExpression sync rules with the async rule, and add a server-side validation note Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> * [release-notes] ASP.NET Core in .NET 11 Preview 6 (#10456) * [release-notes] WPF in .NET 11 Preview 6 (#10466) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Throw InvalidOperationException for sync validation of async validator Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apply late review suggestions from #10456 to the ASP.NET Core notes - OpenAPI unions: correct the third-party generator claim (ApiExplorer does not detect unions via JsonTypeInfoKind.Union; Swashbuckle/NSwag don't yet recognize unions). Per @DeagleGross review on #10456. - Blazor Virtualize: note that a user scroll during ScrollToIndexAsync wins. Per @ilonatommy review on #10456. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add P6 Blazor items to align with docs (dotnet/AspNetCore.Docs#37322) - CSRF: note that Blazor Web App templates no longer call app.UseAntiforgery(). - Bug fixes/Blazor: Virtualize is now CSP-compliant (#66680); session cookie is issued before streaming SSR for [SupplyParameterFromSession]/TempData (#66832). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Document 'Configure Blazor client behavior from the server' as a P6 feature WithBrowserOptions flows client-side Blazor.start configuration from the server in C# (log level, Server reconnection, SSR DOM preservation, WASM environment), serialized to the client across Server/WebAssembly/Auto render modes. Introduced in Preview 4 (server-to-browser config via DOM comment) and reshaped in Preview 6 (dotnet/aspnetcore#67337, proposal #66393). Includes the reshape/rename migration for earlier adopters. Sample build-verified on 11.0.100-preview.6.26359.118. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Correct Virtualize CSP note: data-blazor-virtualize-reserved-height Reviewing dotnet/AspNetCore.Docs#37322 surfaced that the attribute is data-blazor-virtualize-reserved-height (only the server-computed spacer height), not the generic data-blazor-style. Verified in the P6 source (Virtualize.cs / Virtualize.ts). @ilonatommy corrected the same wording on the docs PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [release-notes] .NET Runtime in .NET 11 Preview 6 (#10458) * [release-notes] .NET Runtime in .NET 11 Preview 6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Enrich Preview 6 runtime notes with additional verified features Fold verified .NET 11 Preview 6 runtime changes into runtime.md (JIT improvements, in-process crash logging, NativeAOT interface dispatch, SIMD lane APIs, and an expanded bug-fix list), and rebuild the TOC to match the current sections. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ade796bb-8052-4946-b204-a88518267e77 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Rich Lander <2608468+richlander@users.noreply.github.com> * fix markdown lint in preview6 containers note Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Bill Wagner <wiwagn@microsoft.com> Co-authored-by: Chet Husk <chusk3@gmail.com> Co-authored-by: Chet Husk <baronfel@users.noreply.github.com> Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com> Co-authored-by: David Ortinau <david.ortinau@microsoft.com> Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> Co-authored-by: Logan Bussell <loganbussell@microsoft.com> Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Rich Lander <2608468+richlander@users.noreply.github.com> Co-authored-by: Rahul Bhandari <rbhanda@microsoft.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
|
@tdykstra ... Pre6 is released now. Do you want to review? I don't have a sign-off on this yet, so I can't merge it. Are you planning on pulling the trigger on the merge-to-live (after this and the other PRs go in)? ... We need this merged first. Then, the other one. Then, merge to live. |
|
Hey, sorry for delay, I am going to post PRs with doc changes for CSRF today, and we can reroute to them from here. Indeed as @danroth27 mentioned i'll consolidate the anti-CSRF coverage into a single article that leads with the new automatic CSRF protection; and there will not be a separate migration-only article. I'll send links to the PR soon |
|
@DeagleGross ... Clarification: Do you want to merge the existing PRs first, or do you have a different plan? It sounds like you don't plan to merge the current PRs on CSRF. I'd like to get this PR merged, and I think I have all of Dan's feedback covered. Can you give me a quick review of this (with feedback for changes if you have any) and an approval of this PR, especially the CSRF bits in the forms and security articles? If so, I can get this PR merged this morning. I need at least one approval to get this merged, and you can provide it (with my thanks! 😄). Then ... if you want to ... we can work to get other PRs merged (existing or new PRs) if Tom isn't available. Note that I'll be out from 10:30 to 11:30am EST. I'll be here and available otherwise for most of the day. |
DeagleGross
left a comment
There was a problem hiding this comment.
Approving for unions / csrf - proposed different structure for CSRF + antiforgery explanation
|
|
||
| :::moniker-end | ||
|
|
||
| :::moniker range=">= aspnetcore-11.0" |
There was a problem hiding this comment.
Not sure what kind of info we need to put here, but maybe extend a bit with usage?
:::moniker range=">= aspnetcore-11.0"
Blazor apps are protected against Cross-Site Request Forgery (CSRF/XSRF) by two complementary mechanisms.
Automatic header-based CSRF protection middleware
Automatic CSRF protection middleware is enabled by default in apps built with WebApplication.CreateBuilder. The middleware inspects the Sec-Fetch-Site and Origin headers on unsafe HTTP methods and records a validation verdict on the request. Blazor server-side rendering (SSR) form posts enforce that verdict and return a 400 Bad Request response for cross-origin form posts that aren't trusted. No pipeline configuration is required to enable this protection.
Token-based antiforgery
Token-based antiforgery services are added to the app when xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A is called in the Program file. However, token validation only runs when Antiforgery Middleware is explicitly added to the request processing pipeline by calling xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A.
How the two mechanisms interact
Adding token-based antiforgery doesn't replace the automatic header-based middleware. When an app calls xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A, both defense mechanisms run for a form post: the header-based CSRF protection middleware runs first and records its verdict, then Antiforgery Middleware performs token-based validation. The token-based result is authoritative and overrides the earlier header-based verdict.
To explicitly add Antiforgery Middleware, call xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A after the call to xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A. If there are calls to xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A and xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints%2A, the call to xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A must go between them. A call to xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A must be placed after calls to xref:Microsoft.AspNetCore.Builder.AuthAppBuilderExtensions.UseAuthentication%2A and xref:Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions.UseAuthorization%2A.
Disable the automatic CSRF protection middleware
To disable the automatic header-based CSRF protection middleware, set the DisableCsrfProtection configuration key to true. For example, in appsettings.json:
{
"DisableCsrfProtection": true
}The setting can be supplied by any configuration source, including an environment variable (DisableCsrfProtection=true).
Warning
Disabling the automatic CSRF protection middleware removes the default header-based (Sec-Fetch-Site/Origin) protection for the entire app. Only disable it if you provide an alternative CSRF defense, such as explicitly adopting token-based Antiforgery Middleware with xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A.
For more information, see xref:security/csrf-protection.
Important
The following guidance on the xref:Microsoft.AspNetCore.Components.Forms.AntiforgeryToken component and the xref:Microsoft.AspNetCore.Components.Forms.AntiforgeryStateProvider service only apply to an app that explicitly adopts token-based Antiforgery Middleware by calling xref:Microsoft.AspNetCore.Builder.AntiforgeryApplicationBuilderExtensions.UseAntiforgery%2A in its request processing pipeline.
:::moniker-end
|
@guardrex I'll work on #37329 to merge, but it will refactored differently. I'll remove a separate "migration" article and we'll have one big article explaining CSRF (with relation to Antiforgery), and another will be net10 -> net11 migration doc, where we'll inline migration recommendations. I have approved PR, proposing change to CSRF - but you know the doc purpose better so its OK as it is. |
|
Thanks, @DeagleGross! I'll work that into the Blazor node forms and security coverage before merging this shortly. I won't touch anything else, so this PR shouldn't create merge conflicts with anything that you're working on today. Otherwise, I'll be around outside of 10:30-11:30 EST, but @tdykstra is taking the lead on getting everything else into place AFAIK. However, I can help where needed. Note to @tdykstra that this should go in first ... I'll have it done and merged within an hour ... and then the Blazor INCLUDES file will get sucked into the other PR when it builds. This PR doesn't touch the main What's New |
|
I rolled in all of your new remarks from above. I'm going to edit and improve this coverage further on a future preview/RC PR. I'd like to see what the release CSRF docs in the main doc set cover after you're done. Ideally, the Blazor node should link out for all of this coverage. I think that I'll be able to shed quite a bit of what I'm adding here. If you get build report warnings on your PR(s), they will probably be for cross-links from this. I'm cross-linking the breaking change announcement for Blazor static SSR and the CSRF article. I think the links will change, so you'll just update the cross-links in these Blazor articles when you set up your new PR. The build report should flag them for you. Ping me if you need help with it. I'll get back to you as soon as I can. |
|
@DeagleGross ... Can you give me one more approval? 😩 The new rules require it because I just made changes. [These new rules SUCK!!!! 😆]
|
Addresses #37274
The following is on this PR:
EnvironmentBoundarycomponent toEnvironmentViewcomponentNavigationManager.GetUriWithHashtoNavigationManager.GetUriWithFragmentDisableDomPreservationtoPreserveDom... BUT note that we don't have coverage anywhere for the rest of the mentioned browser options changes. The following are NOT currently covered ...WithBrowserConfigurationis nowWithBrowserOptionsBrowserConfigurationis nowBrowserOptionsServerBrowserOptionsis nowInteractiveServerBrowserOptionsCircuitInactivityTimeoutMsis nowCircuitInactivityTimeout(aTimeSpan)Virtualizecomponent is now CSP-compliant.app.UseAntiforgery()removed from Blazor Web templates: I placed a brief remark cross-linked to the new migration article.To do (I'll take care of these prior to P6 release) ...
Not covered ...
[SerializationExecutionPolicy]attribute forRenderFragmentparameters. If so, may I have content or some content scope suggestions from the PR?@rendermodeno longer throws in WebView. I didn't cover it because it's a bug fix, but I certainly will drop something in on it if you like.Dan ... Prelim remarks and then a question on the introductory union coverage in the Components overview article ...
Prelim
You requested something short, leaving detail to the C# reference, but I'd like to pitch examples that appeal to my inclination to provide a fully working, cut-'n-paste examples that cover a couple of bases, namely ...
switch-edRenderFragmentfor rendering.switch-edSlotContentapproach for rendering.I'll shorten the examples to your liking.
The
DynamicComponentpresentation explains out the boxing requirement with a fully (not 😄) working unboxed case before presenting the correct coding approach. Overkill? Maybe. Let me know if you want that to only show the working approach with merely a passing remark on the boxing requirement.The links used earlier were to the What's New content on unions; but for reference content, we should link the C# reference, which is available now ...
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/union
I leave the What's New link in our What's New coverage (and I place Bill's blog link temporarily in the reference content), but I add the C# reference link to that coverage on this PR. BTW ... that C# What's New link is pointing to the wrong page. It was going to C# 14 content, but I fix that here, too.
❓ Question ❓
Currently, the Components overview article example assigns a C#-built
RenderFragment, which works 🎉 ...However, I was expecting (hoping for) a Razor markup approach to work ...
... but I couldn't get that to work (even if I named the
SlotContenttype in theSlotcomponent to "ChildContent").If there's a Razor markup way to pass that
SlotContent, I think we should show it. If it can't be done, then perhaps we should warn devs off of trying it. Otherwise, some folks will probably waste a lot of time trying to get it to work.Internal previews
Toggle expand/collapse