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"));
        }
Ejemplo n.º 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"));
        }