SyncEndpointExtensions
Extension methods for configuring sync API endpoints and services. These are TOOLS for spinning up a sync server - not an actual server.
public static class SyncEndpointExtensions
Methods
AddSyncApiServices(IServiceCollection, bool)
public static IServiceCollection AddSyncApiServices(this IServiceCollection services, bool isDevelopment = false)
Adds sync API services to the service collection. Includes rate limiting, subscription manager, and logging.
Parameters:
| Name | Type | Description |
|---|---|---|
services |
IServiceCollection |
|
isDevelopment |
Boolean |
Returns: IServiceCollection
UseSyncRequestTimeout(IApplicationBuilder, TimeSpan?)
public static IApplicationBuilder UseSyncRequestTimeout(this IApplicationBuilder app, TimeSpan? timeout = null)
Adds request timeout middleware for production use.
Parameters:
| Name | Type | Description |
|---|---|---|
app |
IApplicationBuilder |
|
timeout |
TimeSpan> |
Returns: IApplicationBuilder
MapSyncEndpoints(IEndpointRouteBuilder)
public static IEndpointRouteBuilder MapSyncEndpoints(this IEndpointRouteBuilder app)
Maps all sync API endpoints to the endpoint route builder.
Parameters:
| Name | Type | Description |
|---|---|---|
app |
IEndpointRouteBuilder |
Returns: IEndpointRouteBuilder