19 lines
576 B
C#
19 lines
576 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace DocumentOperator.Application;
|
|
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddDocumentOperatorApplication(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.AddMediatR(cfg =>
|
|
{
|
|
cfg.LicenseKey = configuration.GetValue<string>("LuckyPennySoftLicenseKey");
|
|
cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly);
|
|
});
|
|
|
|
return services;
|
|
}
|
|
}
|