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")); }
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")); }