27 lines
680 B
C#
27 lines
680 B
C#
using xCommons.Providers;
|
|
using xCommons.Extensions;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
public static partial class XDIHelperExtension
|
|
{
|
|
/// <summary>
|
|
/// Register XCommons Module Services
|
|
/// </summary>
|
|
/// <param name="services"></param>
|
|
public static void AddXCommons(this IServiceCollection services)
|
|
{
|
|
services.AddSingleton<XValidationProvider>();
|
|
}
|
|
|
|
public static void AddXCommons(
|
|
this IServiceCollection services,
|
|
IConfiguration configuration
|
|
)
|
|
{
|
|
//
|
|
services.AddXCommons();
|
|
services.AddXFileTypeDetector(configuration);
|
|
}
|
|
|
|
} |