20 lines
683 B
C#
20 lines
683 B
C#
using EonaCat.DoxaApi.Generation;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace EonaCat.DoxaApi
|
|
{
|
|
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
|
// See the LICENSE file or go to https://EonaCat.com/license for full license details.
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|