namespace System.Web.Configuration
{
- [ConfigurationCollection (typeof (ProfileGroupSettings), AddItemName = "group", CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
public sealed class ProfileGroupSettingsCollection : ConfigurationElementCollection
{
- static ConfigurationPropertyCollection properties;
-
- static ProfileGroupSettingsCollection ()
- {
- properties = new ConfigurationPropertyCollection ();
- }
-
- public ProfileGroupSettingsCollection ()
- {
- }
-
public void Add (ProfileGroupSettings group)
{
BaseAdd (group);
BaseClear ();
}
+ public override ConfigurationElementCollectionType CollectionType
+ {
+ get { return ConfigurationElementCollectionType.AddRemoveClearMap; }
+ }
+
protected override ConfigurationElement CreateNewElement ()
{
return new ProfileGroupSettings ();
protected override object GetElementKey (ConfigurationElement element)
{
- return ((ProfileGroupSettings)element).Name;
+ return ((ProfileGroupSettings) element).Name;
}
public string GetKey (int index)
return BaseIndexOf (group);
}
- [MonoTODO]
- protected override bool IsModified ()
- {
- throw new NotImplementedException ();
- }
-
public void Remove (string name)
{
BaseRemove (name);
BaseRemoveAt (index);
}
- [MonoTODO]
- protected override void ResetModified ()
- {
- base.ResetModified ();
- }
-
public void Set (ProfileGroupSettings group)
{
ProfileGroupSettings existing = Get (group.Name);
}
}
- public string[ ] AllKeys {
- get {
- string[] keys = new string[Count];
- for (int i = 0; i < Count; i ++)
- keys[i] = this[i].Name;
- return keys;
- }
- }
-
- protected override ConfigurationPropertyCollection Properties {
- get { return properties; }
- }
-
public ProfileGroupSettings this[int index] {
get { return Get (index); }
set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
get { return (ProfileGroupSettings) BaseGet (name); }
}
+ internal void ResetInternal (ConfigurationElement parentElement)
+ {
+ Reset (parentElement);
+ }
}
}