internal override void InitFromProperty (PropertyInformation propertyInfo)
{
ConfigurationCollectionAttribute colat = propertyInfo.Property.CollectionAttribute;
+
if (colat == null)
- colat = ElementMap.GetMap (GetType ()).CollectionAttribute;
+ colat = Attribute.GetCustomAttribute (propertyInfo.Type, typeof (ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute;
+
if (colat != null) {
addElementName = colat.AddItemName;
clearElementName = colat.ClearItemsName;
}
protected virtual bool ThrowOnDuplicate {
- get { return true; }
+ get {
+ if (CollectionType != ConfigurationElementCollectionType.AddRemoveClearMap &&
+ CollectionType != ConfigurationElementCollectionType.AddRemoveClearMapAlternate)
+ return false;
+
+ return true;
+ }
}
protected internal string AddElementName {