2020-05-11 15:34:47 +02:00
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2020-04-05 00:29:26 +02:00
|
|
|
using System;
|
2020-05-14 13:32:33 +02:00
|
|
|
using zero.Core.Options;
|
2020-04-05 00:29:26 +02:00
|
|
|
|
|
|
|
|
namespace zero.Web
|
|
|
|
|
{
|
2020-04-05 00:39:12 +02:00
|
|
|
public static class ZeroServiceCollectionExtensions
|
2020-04-05 00:29:26 +02:00
|
|
|
{
|
2020-05-27 18:29:36 +02:00
|
|
|
public static ZeroBuilder AddZero(this IServiceCollection services, IConfiguration configuration)
|
2020-04-05 00:29:26 +02:00
|
|
|
{
|
2020-05-27 18:29:36 +02:00
|
|
|
return new ZeroBuilder(services, configuration, null);
|
2020-04-05 00:29:26 +02:00
|
|
|
}
|
|
|
|
|
|
2020-05-27 18:29:36 +02:00
|
|
|
public static ZeroBuilder AddZero(this IServiceCollection services, IConfiguration configuration, Action<IZeroStartupOptions> setupAction)
|
2020-04-05 00:29:26 +02:00
|
|
|
{
|
2020-05-27 18:29:36 +02:00
|
|
|
return new ZeroBuilder(services, configuration, setupAction);
|
2020-04-05 00:29:26 +02:00
|
|
|
}
|
|
|
|
|
}
|
2020-05-12 13:42:01 +02:00
|
|
|
}
|