namespace System.Web.Configuration
{
- [ConfigurationCollection (typeof (ProfilePropertySettings), CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
public class ProfilePropertySettingsCollection : ConfigurationElementCollection
{
- static ConfigurationPropertyCollection properties;
-
- static ProfilePropertySettingsCollection ()
- {
- properties = new ConfigurationPropertyCollection ();
- }
-
- public ProfilePropertySettingsCollection ()
- {
- }
-
public void Add (ProfilePropertySettings propertySettings)
{
BaseAdd (propertySettings);
BaseClear ();
}
+ public override ConfigurationElementCollectionType CollectionType
+ {
+ get { return ConfigurationElementCollectionType.AddRemoveClearMap; }
+ }
+
protected override ConfigurationElement CreateNewElement ()
{
return new ProfilePropertySettings ();
return BaseIndexOf (propertySettings);
}
- [MonoTODO]
- protected override bool OnDeserializeUnrecognizedElement (string elementName, XmlReader reader)
- {
- throw new NotImplementedException ();
- }
-
public void Remove (string name)
{
BaseRemove (name);
}
}
- [MonoTODO]
protected virtual bool AllowClear {
get {
- throw new NotImplementedException ();
+ return false;
}
}
- protected override ConfigurationPropertyCollection Properties {
- get { return properties; }
- }
-
public ProfilePropertySettings this[int index] {
get { return Get (index); }
set { if (Get (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
}
- public new ProfilePropertySettings this[string name] {
- get { return Get (name); }
- }
-
protected override bool ThrowOnDuplicate {
- get { return false; }
+ get {
+ return true;
+ }
}
-
}
}