public override IConfigurationProvider Build(IConfigurationBuilder builder)
        {
            IPandoraContext          context    = new ApplicationContext();
            IConfigurationRepository repository = new ConsulForPandora(new Uri(consulHost));

            Pandora             = new Pandora(context, repository);
            ChangeTokenConsumer = (provider) => Task.Factory.StartNew(() => provider.Load(reload: true));

            return(new PandoraConfigurationProvider(this));
        }
예제 #2
0
        public override IConfigurationProvider Build(IConfigurationBuilder builder)
        {
            IPandoraContext context = new ApplicationContext();

            ConsulForPandora repository = new ConsulForPandora(consulHost);

            Pandora             = new Pandora(context, repository);
            ReloadWatcher       = new ConsulRefresher(Pandora, new ConsulClient(consulHost), ReloadDelay);
            ChangeTokenConsumer = (provider) => Task.Factory.StartNew(() => provider.Load());

            return(new PandoraConfigurationProvider(this));
        }