Example #1
0
        /// <summary>
        /// Reads entries in the specified configuration file
        /// concatenates with existing _configEntries list
        /// </summary>
        /// <param name="file">file name to read</param>
        public static void AddConfiguration(string file)
        {
            var readEntries = _configReader.ReadFromFile(file);

            foreach (var entry in readEntries)
            {
                var existingEntry = _configEntries.FirstOrDefault(x => x.Key == entry.Key);
                if (existingEntry != null)
                {
                    existingEntry.Value = entry.Value;
                }
                else
                {
                    _configEntries.Add(entry);
                }
            }
        }