// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if CONFIGURATION_DEP
using System;
namespace System.Configuration
{
public sealed class SettingElementCollection
-#if (CONFIGURATION_DEP)
: ConfigurationElementCollection
-#endif
{
public SettingElementCollection ()
{
}
- [MonoTODO]
public void Add (SettingElement element)
{
- throw new NotImplementedException ();
+ BaseAdd (element);
}
- [MonoTODO]
public void Clear ()
{
- throw new NotImplementedException ();
+ BaseClear ();
}
- [MonoTODO]
public SettingElement Get (string elementKey)
{
- throw new NotImplementedException ();
+ foreach (SettingElement el in this)
+ if (el.Name == elementKey)
+ return el;
+ return null;
}
- [MonoTODO]
public void Remove (SettingElement element)
{
- throw new NotImplementedException ();
+ if (element == null)
+ throw new ArgumentNullException ("element");
+ BaseRemove (element.Name);
}
-#if (CONFIGURATION_DEP)
protected override ConfigurationElement CreateNewElement ()
{
return new SettingElement ();
protected override string ElementName {
get { return "setting"; }
}
-#endif
}
}