Inheritance: IBrokerConfiguration
        private ServiceConfiguration(string configFile)
        {
            var physicalLocation = searchPaths.Select(p => Path.Combine(p, configFile))
                                              .FirstOrDefault(File.Exists);

            if (physicalLocation == null) throw new FileNotFoundException("Cannot find file config", configFile);

            _config = new ConfigurationBuilder(new JsonConfigurationProvider(physicalLocation)).Build();

            Broker = new BrokerConfiguration(_config.GetSection("broker"));
            EventStore = new EventStoreConfiguration(_config.GetSection("eventStore"));
        }
Beispiel #2
0
        private ServiceConfiguration(string configFile)
        {
            var physicalLocation = searchPaths.Select(p => Path.Combine(p, configFile))
                                   .FirstOrDefault(File.Exists);

            if (physicalLocation == null)
            {
                throw new FileNotFoundException("Cannot find file config", configFile);
            }

            _config = new ConfigurationBuilder(new JsonConfigurationProvider(physicalLocation)).Build();

            Broker     = new BrokerConfiguration(_config.GetSection("broker"));
            EventStore = new EventStoreConfiguration(_config.GetSection("eventStore"));
        }