using System.Configuration; namespace AspClassic.Scripting.Hosting.Configuration; public class OptionElementCollection : ConfigurationElementCollection { public override ConfigurationElementCollectionType CollectionType => ConfigurationElementCollectionType.AddRemoveClearMap; protected override bool ThrowOnDuplicate => false; public OptionElementCollection() { base.AddElementName = "set"; } protected override ConfigurationElement CreateNewElement() { return new OptionElement(); } protected override object GetElementKey(ConfigurationElement element) { return ((OptionElement)element).GetKey(); } }