public void Init()
        {
            ILogger nullableLogger = NullLogger.Instance;

            var options = new ConfigOptions();

            options.SetConfigFilePath(@"..\..\..\ConfigCoreTests\TestConfig.yaml");
            _config = new Config(options);


            new FileConfig(nullableLogger, Path.GetFullPath(@"..\..\..\ConfigCoreTests\TestConfig.yaml"));
        }
        public void Init()
        {
            var opt = new ConfigOptions();

            opt.SetConfigFilePath(Path.GetFullPath(@"..\..\..\ConfigCoreTests\TestConfig.yaml"));

            ILogger nullableLogger = NullLogger.Instance;
            IConfig config         = new Config(opt);

            _config        = new ConsulConfig(config, nullableLogger, new Converter(nullableLogger));
            _config.client = new DummyConsulClient();
        }
Esempio n. 3
0
        public Discovery(InitializationOptions options)
        {
            _logger = options.Logger ?? new NullLogger <Discovery>();

            _configOptions = new ConfigOptions();
            _configOptions.SetConfigFilePath(options.ConfigFilePath);
            _configOptions.SetExtensions(options.Extension);
            _configOptions.SetLogger(_logger);

            switch (options.Extension)
            {
            case Extension.Consul: _discoverySource = new ConsulDiscovery(_configOptions, _logger);
                break;

            default:
                break;
            }
        }