コード例 #1
0
 /// <summary>
 /// Intersects the values.
 /// </summary>
 /// <param name="intersectValues">The intersect values.</param>
 public void IntersectValues(ConfigurationValues intersectValues)
 {
     foreach (string key in intersectValues.Keys)
     {
         this[key] = intersectValues[key];
     }
 }
コード例 #2
0
        private void ReadParameters(XmlReader reader, bool intersectAlternateConfig)
        {
            ReadParamsReader(reader);

            if (intersectAlternateConfig)
            {
                string alternateConfigFile;
                if (TryGetString("externalconfig", out alternateConfigFile))
                {
                    if (File.Exists(alternateConfigFile))
                    {
                        ConfigurationValues fileValues = new ConfigurationValues();
                        fileValues.ReadParametersFromStream(alternateConfigFile, false);
                        IntersectValues(fileValues);
                    }
                }
            }
        }