public static ISharpPlugBuilder AddSharpPlugCore(this IServiceCollection services) { var builder = new DefaultSharpPlugBuilder(services); builder.Register(); return(builder); }
public static ISharpPlugBuilder AddSharpPlugCore(this IServiceCollection services, Action <SharpPlogCoreOptions> setupAction = null) { var builder = new DefaultSharpPlugBuilder(services); var options = new SharpPlogCoreOptions(); setupAction?.Invoke(options); builder.Register(options.ClassSuffix.ToArray(), options.DiAssembly.ToArray()); return(builder); }