<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />

ConfigurationCollectionAttribute

Used on classes derived from ConfigurationElementCollection. Specifies the collection item type and verbs used for add/remove/clear.
namespace System.Configuration { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] public sealed class ConfigurationCollectionAttribute : Attribute { private string _addItemName; private string _clearItemsName; private string _removeItemName; public Type ItemType { get; } public string AddItemName { get { return _addItemName ?? "add"; } set { if (string.IsNullOrEmpty(value)) value = null; _addItemName = value; } } public string RemoveItemName { get { return _removeItemName ?? "remove"; } set { if (string.IsNullOrEmpty(value)) value = null; _removeItemName = value; } } public string ClearItemsName { get { return _clearItemsName ?? "clear"; } set { if (string.IsNullOrEmpty(value)) value = null; _clearItemsName = value; } } public ConfigurationElementCollectionType CollectionType { get; set; } = ConfigurationElementCollectionType.AddRemoveClearMap; public ConfigurationCollectionAttribute(Type itemType) { if (itemType == (Type)null) throw new ArgumentNullException("itemType"); ItemType = itemType; } } }