draft: refactor project so it sits on top of a standalone app
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using zero.Core;
|
||||
|
||||
@@ -6,14 +7,14 @@ namespace zero.Web
|
||||
{
|
||||
public static class ZeroServiceCollectionExtensions
|
||||
{
|
||||
public static ZeroBuilder AddZero(this IServiceCollection services)
|
||||
public static ZeroBuilder AddZero(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
return new ZeroBuilder(services);
|
||||
return new ZeroBuilder(services, configuration);
|
||||
}
|
||||
|
||||
public static ZeroBuilder AddZero(this IServiceCollection services, Action<ZeroOptions> setupAction)
|
||||
public static ZeroBuilder AddZero(this IServiceCollection services, IConfiguration configuration, Action<ZeroOptions> setupAction)
|
||||
{
|
||||
return services.AddZero().WithOptions(setupAction);
|
||||
return services.AddZero(configuration).WithOptions(setupAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user