示例#1
0
        public virtual LoggingConfiguration Build(ILoggingOptions settings)
        {
            BeforeBuildAction?.Invoke(this, settings);
            var loggingConfiguration = new LoggingConfiguration(settings, ConfigurationBuilder.Build());

            AfterBuildAction?.Invoke(loggingConfiguration);
            return(loggingConfiguration);
        }
示例#2
0
        public override LoggingConfiguration Build(ILoggingOptions settings)
        {
            BeforeBuildAction?.Invoke(this, settings);
            var loggingConfiguration = new LoggingConfiguration(settings, _root);

            AfterBuildAction?.Invoke(loggingConfiguration);
            return(loggingConfiguration);
        }
示例#3
0
        public IServiceProvider Build()
        {
            if (_hasBuild)
            {
                throw new InvalidOperationException("Only can be built once.");
            }

            BeforeBuildAction?.Invoke(_services);

            var resolver = _services.ToServiceContainer().Build();

            AfterBuildAction?.Invoke(resolver);

            _hasBuild = true;

            return(resolver);
        }