Пример #1
0
        private LoggerService CreateLoggerService(IEnumerable <Assembly> assemblies)
        {
            var discoveryService = new LoggerResolver();
            var loggers          = discoveryService.CreateLoggers(Configuration, assemblies);

            return(new LoggerService(loggers));
        }
Пример #2
0
        public JsonCollectorFactory(IEnumerable <JToken> collectorsJson, IDispatcher dispatcher, LoggerResolver loggerResolver)
        {
            Ensure.That(collectorsJson, nameof(collectorsJson)).IsNotNull();
            Ensure.That(dispatcher, nameof(dispatcher)).IsNotNull();

            _collectorsJson = collectorsJson;
            _dispatcher     = dispatcher;
            _loggerResolver = loggerResolver;
        }
Пример #3
0
        public virtual void TearDown()
        {
            PluginManager.Current = null;
            SqlSyntaxContext.SqlSyntaxProvider = null;
            MigrationResolver.Reset();
            LoggerResolver.Reset();

            TestHelper.CleanContentDirectories();

            Path = TestHelper.CurrentAssemblyDirectory;
            AppDomain.CurrentDomain.SetData("DataDirectory", null);

            DatabaseSpecificTearDown();
        }
 public void TearDown()
 {
     LoggerResolver.Reset();
     MigrationResolver.Reset();
 }
Пример #5
0
 public static void UseDefault()
 {
     Resolve = t => new NullLogger();
 }