using System;
using System.Configuration;
-#if NET_2_0
namespace System.Web.Configuration {
BaseClear ();
}
- [MonoTODO]
public bool Contains (string name)
{
- throw new NotImplementedException ();
+ return BaseGet (name) != null;
}
protected override ConfigurationElement CreateNewElement ()
{
- return new ProfileSettings ("");
+ return new ProfileSettings ();
}
protected override object GetElementKey (ConfigurationElement element)
return ((ProfileSettings)element).Name;
}
- [MonoTODO]
public int IndexOf (string name)
{
- throw new NotImplementedException ();
+ ProfileSettings s = (ProfileSettings)BaseGet (name);
+ if (s == null)
+ return -1; /* XXX */
+ else
+ return BaseIndexOf (s);
}
- [MonoTODO]
+ [MonoTODO ("why did they use 'Insert' and not 'Add' as other collections do?")]
public void Insert (int index, ProfileSettings authorizationSettings)
{
- throw new NotImplementedException ();
+ BaseAdd (index, authorizationSettings);
}
public void Remove (string name)
BaseRemoveAt (index);
}
- public new ProfileSettings this [string name] {
- get { return (ProfileSettings)BaseGet (name); }
+ public new ProfileSettings this [string key] {
+ get { return (ProfileSettings)BaseGet (key); }
}
public ProfileSettings this [int index] {
set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
}
- protected override ConfigurationPropertyCollection Properties {
+ protected internal override ConfigurationPropertyCollection Properties {
get { return properties; }
}
}
-#endif