From 8da37ced2412eb8e8cb0cb28e3fabe7ce04b81c3 Mon Sep 17 00:00:00 2001 From: Abhitej John Date: Mon, 4 May 2026 14:05:27 -0700 Subject: [PATCH] Add 7 new .NET 11 skills to dotnet11 plugin --- .../SKILL.md | 307 ++++++++++++++++++ .../SKILL.md | 202 ++++++++++++ .../skills/dotnet-networking-net11/SKILL.md | 153 +++++++++ .../dotnet-numerics-memory-net11/SKILL.md | 132 ++++++++ .../skills/dotnet-runtime-core-net11/SKILL.md | 304 +++++++++++++++++ .../SKILL.md | 191 +++++++++++ .../system-io-compression-net11/SKILL.md | 211 ++++++++++++ 7 files changed, 1500 insertions(+) create mode 100644 plugins/dotnet11/skills/aspnetcore-blazor-components-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/aspnetcore-middleware-services-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/dotnet-networking-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/dotnet-numerics-memory-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/dotnet-runtime-core-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/dotnet-security-cryptography-net11/SKILL.md create mode 100644 plugins/dotnet11/skills/system-io-compression-net11/SKILL.md diff --git a/plugins/dotnet11/skills/aspnetcore-blazor-components-net11/SKILL.md b/plugins/dotnet11/skills/aspnetcore-blazor-components-net11/SKILL.md new file mode 100644 index 0000000000..562e287e4d --- /dev/null +++ b/plugins/dotnet11/skills/aspnetcore-blazor-components-net11/SKILL.md @@ -0,0 +1,307 @@ +--- +name: aspnetcore-blazor-components-net11 +description: > + Covers new .NET 11 APIs across Microsoft.AspNetCore.Components, + Components.Web, and Components.Endpoints. Includes navigation improvements + (GetUriWithHash, RelativeToCurrentUri), contravariant RenderFragment, + IComponentPropertyActivator, form components (Label, DisplayName), media + components (Image, Video, FileDownload with MediaSource), EnvironmentBoundary, + BasePath, ITempData, and TempDataProviderType. Use when building Blazor apps + that need navigation, forms, media rendering, environment-conditional content, + or cross-request temporary data in .NET 11. +license: MIT +--- + +# ASP.NET Core Blazor Components — .NET 11 APIs + +Target framework: `net11.0` + +--- + +## Navigation Improvements +Assembly: `Microsoft.AspNetCore.Components` + +### GetUriWithHash + +Extension method returning the current URI with a hash fragment appended. + +```csharp +public static string GetUriWithHash(this NavigationManager nav, string hash); +``` + +```razor +@inject NavigationManager Nav + + + +@code { + private void GoToSection() + { + string uri = Nav.GetUriWithHash("#section1"); + Nav.NavigateTo(uri); + } +} +``` + +### NavigationOptions.RelativeToCurrentUri + +New `bool` init-only property. When `true`, the target URI resolves relative +to the current URI rather than the base URI. + +```razor +@inject NavigationManager Nav + +@code { + private void GoToSettings() + { + // From /app/dashboard → /app/settings + Nav.NavigateTo("../settings", new NavigationOptions + { + RelativeToCurrentUri = true + }); + } +} +``` + +### NavLink.RelativeToCurrentUri + +| Type | Default | Description | +|------|---------|-------------| +| `bool` | `false` | When `true`, matching is relative to current URI | + +```razor + + Profile Settings + +``` + +--- + +## Component Model +Assembly: `Microsoft.AspNetCore.Components` + +### IComponentPropertyActivator + +Interface for custom component property activation. + +```csharp +public interface IComponentPropertyActivator +{ + Action GetActivator(Type type); +} +``` + +### Contravariant RenderFragment<in TValue> + +`RenderFragment` now uses `in` variance, enabling assignment +compatibility with more derived types. + +```csharp +RenderFragment animalFragment = (animal) => builder => +{ + builder.AddContent(0, $"Animal: {animal.Name}"); +}; + +// Valid due to contravariance +RenderFragment dogFragment = animalFragment; +``` + +--- + +## Form Components +Assembly: `Microsoft.AspNetCore.Components.Web` + +### Label<TValue> + +Renders `