Modrich.Sdk.Web
0.1.0
dotnet add package Modrich.Sdk.Web --version 0.1.0
NuGet\Install-Package Modrich.Sdk.Web -Version 0.1.0
<PackageReference Include="Modrich.Sdk.Web" Version="0.1.0" />
<PackageVersion Include="Modrich.Sdk.Web" Version="0.1.0" />
<PackageReference Include="Modrich.Sdk.Web" />
paket add Modrich.Sdk.Web --version 0.1.0
#r "nuget: Modrich.Sdk.Web, 0.1.0"
#:package Modrich.Sdk.Web@0.1.0
#addin nuget:?package=Modrich.Sdk.Web&version=0.1.0
#tool nuget:?package=Modrich.Sdk.Web&version=0.1.0
Modrich.Sdk.Web
Meta-package for .Web (Razor Class Library) module projects in the Modrich modular foundation for .NET 10. Contains no types — it exists to bundle the Tier 1 references a UI module needs without dragging EF Core into the transitive closure.
What it pulls in
Modrich.Abstractions—IModule,IAppModule, layout slots (LayoutSections,IModuleLayoutWidget).Gatekeep.Authorization.Abstractions—IPermissionCatalog,PermissionConstants, etc.Modrich.Web— host-side web helpers, includingCookieForwardingHandler(namespaceModrich.Web.Authorization).Modrich.Navigation.Abstractions—IMainMenuProvider,IModuleMenuProvider,JsonModuleMenuProvider,NavItem,MenuItem.
Compare to Modrich.Sdk.Api: that one pulls in API-side abstractions for backend modules. This one is for the .Web (RCL) project that owns Razor components, menus, and UI-side DI.
Install
dotnet add package Modrich.Sdk.Web
In your module's RCL csproj:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<ItemGroup>
<PackageReference Include="Modrich.Sdk.Web" />
</ItemGroup>
</Project>
Usage — the App module
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Modrich.Layout;
using Modrich.Modules;
using Modrich.Navigation;
[assembly: ModuleAssembly]
namespace Acme.Orders.Web;
public sealed class OrdersAppModule : IAppModule
{
public string Name => "Orders";
public void RegisterAppDependencies(IServiceCollection services, IConfiguration configuration, string? apiBaseUrl = null)
{
services.AddSingleton<IMainMenuProvider, OrdersMainMenuProvider>();
services.AddSingleton<IModuleMenuProvider>(_ =>
JsonModuleMenuProvider.FromEmbeddedResource(
routePrefix: "orders",
resourceType: typeof(Resources.Strings),
assembly: typeof(OrdersAppModule).Assembly,
resourceName: "Acme.Orders.Web.menu.json"));
services.AddSingleton<IModuleLayoutWidget>(new ModuleLayoutWidget(typeof(Components.OrdersFooterBadge)));
}
public void ConfigureAppPipeline(WebApplication app) { /* optional */ }
public void MapAppEndpoints(IEndpointRouteBuilder endpoints) { /* optional */ }
}
Usage — slotting UI into the host shell
A layout widget targets a named region:
@* Components/OrdersFooterBadge.razor *@
<SectionContent SectionName="@LayoutSections.Footer">
<span>Orders module v@(Version)</span>
</SectionContent>
Available slots:
LayoutSections.TopLeftLayoutSections.TopRightLayoutSections.SidebarTopLayoutSections.SidebarBottomLayoutSections.Footer
Related packages
Modrich.Sdk.Api— meta-package for API/backend modules.Modrich.Navigation.Abstractions— menu types this package re-exposes.Modrich.Modularity— host-side; not for modules.
Versioning
Pinned to the same major as the underlying Tier 1 packages.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Gatekeep.Authorization.Abstractions (>= 0.0.1)
- Modrich.Abstractions (>= 0.1.0)
- Modrich.Modularity (>= 0.1.0)
- Modrich.Navigation.Abstractions (>= 0.1.0)
- Modrich.Web (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.