18 lines
497 B
C#
18 lines
497 B
C#
using EonaCat.DoxaApi.Generation;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace EonaCat.DoxaApi
|
|
{
|
|
public static class DoxaApiServiceCollectionExtensions
|
|
{
|
|
|
|
public static IServiceCollection AddDoxaApi(this IServiceCollection services, Action<DoxaApiOptions>? configure = null)
|
|
{
|
|
var options = new DoxaApiOptions();
|
|
configure?.Invoke(options);
|
|
services.AddSingleton(options);
|
|
return services;
|
|
}
|
|
}
|
|
}
|