public void Update(ConfigurationSection section) { if (string.IsNullOrEmpty(this.Name) && !string.IsNullOrEmpty(section.Name)) { this.Name = section.Name; } if (string.IsNullOrEmpty(this.Description) && !string.IsNullOrEmpty(section.Description)) { this.Description = section.Description; } this.Flags |= section.Flags; foreach (var element in section.Elements) { if (!this.Contains(element.Id)) { this.Add(element); } else { this.Update(element); } } }
public ConfigurationSection WithFlags(ConfigurationSectionFlags flags) { this.Flags = flags; return(this); }