Ejemplo n.º 1
0
 public AbpEfCoreFileConfigurationRepository(ConfigCacheOptions option, IOcelotCache <FileConfiguration> cache, IOcelotRepository ocelotGlobalConfigurationRepository, IOcelotLoggerFactory loggerFactory)
 {
     _ocelotGlobalConfigurationRepository = ocelotGlobalConfigurationRepository;
     _option = option;
     _cache  = cache;
     _logger = loggerFactory.CreateLogger <AbpEfCoreFileConfigurationRepository>();
 }
Ejemplo n.º 2
0
 public UpdateFileConfigurationEventHandler(ConfigCacheOptions option,
                                            IFileConfigurationRepository fileConfigurationRepository,
                                            IAbpFileConfigurationRepository abpFileConfigurationRepository)
 {
     _option = option;
     _fileConfigurationRepository    = fileConfigurationRepository;
     _abpFileConfigurationRepository = abpFileConfigurationRepository;
 }
 public FileConfigurationRepository(
     ConfigCacheOptions option,
     IOcelotCache <FileConfiguration> cache,
     IAbpFileConfigurationRepository abpFileConfigurationRepository,
     IOcelotLoggerFactory loggerFactory)
 {
     _option = option;
     _cache  = cache;
     _abpFileConfigurationRepository = abpFileConfigurationRepository;
     _logger = loggerFactory.CreateLogger <FileConfigurationRepository>();
 }
Ejemplo n.º 4
0
        public FileConfigurationRepository()
        {
            _cachOptions       = new Mock <IOcelotCache <FileConfiguration> >();
            _fileConfiguration = new Mock <IOcelotCache <FileConfiguration> >();
            _ocelotRepository  = GetRequiredService <IOcelotRepository>();
            _loggerFactory     = new Mock <IOcelotLoggerFactory>();
            var logger = new Mock <IOcelotLogger>();

            _loggerFactory.Setup(x => x.CreateLogger <AbpEfCoreFileConfigurationRepository>()).Returns(logger.Object);
            _configCacheOptions = new ConfigCacheOptions {
                GatewayName = "middleware"
            };
        }
Ejemplo n.º 5
0
 public UpdateFileConfigurationEventHandler(ConfigCacheOptions option,
                                            IFileConfigurationRepository fileConfigurationRepository,
                                            IAbpFileConfigurationRepository abpFileConfigurationRepository,
                                            IInternalConfigurationRepository internalConfigRepo,
                                            IInternalConfigurationCreator internalConfigCreator,
                                            ILogger <UpdateFileConfigurationEventHandler> logger)
 {
     _option = option;
     _fileConfigurationRepository    = fileConfigurationRepository;
     _abpFileConfigurationRepository = abpFileConfigurationRepository;
     _internalConfigRepo             = internalConfigRepo;
     _internalConfigCreator          = internalConfigCreator;
     _logger = logger;
 }
Ejemplo n.º 6
0
        public FileConfigurationRepository_Tests()
        {
            _cachOptions      = Substitute.For <IOcelotCache <FileConfiguration> >();
            _ocelotRepository = GetRequiredService <IOcelotRepository>();
            _loggerFactory    = Substitute.For <IOcelotLoggerFactory>();
            var logger = Substitute.For <IOcelotLogger>();

            _loggerFactory.CreateLogger <FileConfigurationRepository>().Returns(logger);


            _configCacheOptions = new ConfigCacheOptions {
                GatewayName = "middleware"
            };
        }