Exemple #1
0
        public static ISharpPlugBuilder AddSharpPlugCore(this IServiceCollection services)
        {
            var builder = new DefaultSharpPlugBuilder(services);

            builder.Register();

            return(builder);
        }
Exemple #2
0
        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);
        }