public override void Configure(Container container)
        {
            SetConfig(new HostConfig {
                WebHostUrl = serviceUrl, ApiVersion = "2.3", HandlerFactoryPath = "api"
            });

            AppSettings = new ConsulAppSettings(KeySpecificity.Global).WithCache(10000);

            // Uncomment the following line to use Multi cascading IAppSetting providers

            /*AppSettings = new MultiAppSettings(
            *   new ConsulAppSettings(),
            *   new AppSettings(),
            *   new EnvironmentVariableSettings());*/
        }
Exemplo n.º 2
0
        public override void Configure(Container container)
        {
            SetConfig(new HostConfig {
                WebHostUrl = serviceUrl
            });

            AppSettings = new ConsulAppSettings();

            // Uncomment the following line to use Multi cascading IAppSetting providers

            /*AppSettings = new MultiAppSettings(
            *   new ConsulAppSettings(),
            *   new AppSettings(),
            *   new EnvironmentVariableSettings());*/
        }
Exemplo n.º 3
0
        public void Set_Respects_KeySpecificity(KeySpecificity keySpecificity, string expectedKey)
        {
            var keySpecificAppSetting = new ConsulAppSettings(keySpecificity);

            VerifySetEndpoint(() => keySpecificAppSetting.Set(SlashKey, 123), "true", expectedKey);
        }
Exemplo n.º 4
0
 public ConsulAppSettingsTests(AppHostFixture fixture)
 {
     this.fixture = fixture;
     appSettings  = new ConsulAppSettings(KeySpecificity.LiteralKey);
 }
Exemplo n.º 5
0
 public ConsulAppSettingsTests()
 {
     appSettings = new ConsulAppSettings();
 }