コード例 #1
0
 public ConfigController(IConfigMapper configMapper, ILog log, IConfigRepository configRepository, IRoleConfigFactory roleConfigFactory, IEnvironment environment, ITaskSetBuilder taskSetBuilder)
 {
     this.configMapper = configMapper;
     this.log = log;
     this.configRepository = configRepository;
     this.roleConfigFactory = roleConfigFactory;
     this.environment = environment;
     this.taskSetBuilder = taskSetBuilder;
 }
コード例 #2
0
 public void SetUp()
 {
     log = MockRepository.GenerateMock<ILog>();
     configMapper = MockRepository.GenerateMock<IConfigMapper>();
     configRepository = MockRepository.GenerateMock<IConfigRepository>();
     roleConfigFactory = MockRepository.GenerateMock<IRoleConfigFactory>();
     environment = MockRepository.GenerateMock<IEnvironment>();
     taskSetBuilder = MockRepository.GenerateMock<ITaskSetBuilder>();
     configController = new ConfigController(this.configMapper, this.log, this.configRepository, this.roleConfigFactory, this.environment, taskSetBuilder);
 }
コード例 #3
0
        /// <summary>
        /// Main constructor for ConfigRetriever
        /// </summary>
        /// <param name="retriever"><see cref="IRetriever"/>
        /// Interface for retrieve data from configuration system.
        /// Usualy <see cref="GH.DD.ConfigRetriever.Retrievers.ConsulRetriever"/>
        /// for retrieve from Consul</param>
        public ConfigRetriever(IRetriever retriever, ILogger logger = null)
        {
            _retriever       = retriever ?? throw new ArgumentNullException(nameof(retriever));
            _walker          = new ConfigWalker <TItem>();
            _convertProvider = new ConvertProvider();
            _configMapper    = new ConfigMapper <TItem>();

            _logger = logger;
            if (logger == null)
            {
                _logger = _defaultLogger;
            }
        }
コード例 #4
0
 public ConfigController(IConfigMapper configMapper, ILog log, IConfigRepository configRepository)
 {
     this.configMapper = configMapper;
     this.log = log;
     this.configRepository = configRepository;
 }