FastEndpoints abstractions for CShells. Contains interfaces for integrating FastEndpoints with shell features. Reference this package when building shell features that expose FastEndpoints.
$ dotnet add package CShells.FastEndpoints.AbstractionsAbstractions for FastEndpoints integration with CShells.
This package provides the marker interface IFastEndpointsShellFeature that feature libraries can implement to indicate they contain FastEndpoints. Reference this package in your feature class libraries to avoid depending on the full FastEndpoints framework.
IFastEndpointsShellFeature - Marker interface for features containing FastEndpointsIFastEndpointsConfigurator - Interface for customizing FastEndpoints configurationdotnet add package CShells.FastEndpoints.Abstractions
In your feature class library, implement IFastEndpointsShellFeature:
using CShells.FastEndpoints.Features;
using CShells.Features;
using Microsoft.Extensions.DependencyInjection;
[ShellFeature("MyApi", DependsOn = ["FastEndpoints"])]
public class MyApiFeature : IFastEndpointsShellFeature
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IMyService, MyService>();
}
}
Implement IFastEndpointsConfigurator to customize FastEndpoints:
using CShells.FastEndpoints.Contracts;
using FastEndpoints;
public class MyConfigurator : IFastEndpointsConfigurator
{
public void Configure(Config config)
{
config.Serializer.Options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
}
}
YourSolution/
├── src/
│ ├── YourApp/ # Main ASP.NET Core application
│ │ └── YourApp.csproj # References: CShells.FastEndpoints
│ └── YourApp.Features/ # Feature definitions library
│ └── YourApp.Features.csproj # References: CShells.FastEndpoints.Abstractions
IWebShellFeature interface