Exemplo n.º 1
0
        public void CMU_ComponentProperty()
        {
            var configFile = new URL(Helper.FilesDirectory + "/util/props/ConfigurationManagerTest.testconfig.sxl");
            var cm         = new ConfigurationManager(configFile);

            const int newBeamWidth = 4711;

            ConfigurationManagerUtils.SetProperty(cm, "beamWidth", newBeamWidth.ToString(CultureInfo.InvariantCulture));

            var dummyComp = (DummyComp)cm.Lookup("duco");

            Assert.AreEqual(newBeamWidth, dummyComp.GetBeamWidth());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sets property within a "component" tag in configuration.
 /// Use this method to alter "value" property of a "property" tag inside a
 /// "component" tag of the XML configuration.
 /// </summary>
 /// <param name="name">The property name.</param>
 /// <param name="value">The property value.</param>
 public void SetLocalProperty(String name, Object value)
 {
     ConfigurationManagerUtils.SetProperty(_configurationManager, name, value.ToString());
 }