ASP.NET Core abstractions for CShells. Contains interfaces and models for building web shell features without dependencies on the full CShells framework. Reference this package in your ASP.NET Core feature libraries.
$ dotnet add package CShells.AspNetCore.AbstractionsASP.NET Core abstractions for building web shell features without dependencies on the full CShells framework.
This package contains ASP.NET Core-specific interfaces and models for building web features. By referencing only this package in your web feature libraries, you avoid pulling in the entire CShells runtime and its dependencies.
IWebShellFeature - Interface for features that can register both services and HTTP endpointsdotnet add package CShells.AspNetCore.Abstractions
using CShells.AspNetCore.Features;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
[ShellFeature("Api", DisplayName = "API Feature")]
public class ApiFeature : IWebShellFeature
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IApiService, ApiService>();
}
public void MapEndpoints(IEndpointRouteBuilder endpoints, IHostEnvironment? environment)
{
endpoints.MapGet("api/status", () => new { Status = "OK" });
}
}