예제 #1
0
        public void read_host_directive()
        {
            theEnvironmentSettings.ReadText("Host1.OneDirective.Name=Jeremy");
            theEnvironmentSettings.ReadText("Host1.OneDirective.Age=45");
            theEnvironmentSettings.ReadText("Host2.OneDirective.Name=Tom");

            theEnvironmentSettings.DataForHost("Host1").Get("OneDirective.Name").ShouldEqual("Jeremy");
            theEnvironmentSettings.DataForHost("Host2").Get("OneDirective.Name").ShouldEqual("Tom");
            theEnvironmentSettings.DataForHost("Host1").Get("OneDirective.Age").ShouldEqual("45");
        }
예제 #2
0
 private static void addEnvironmentSettingsToHosts(EnvironmentSettings environment, IEnumerable <HostManifest> hosts)
 {
     hosts.Each(host => host.RegisterSettings(environment.DataForHost(host.Name)));
 }