{
}
- [MonoTODO]
public void Add (ProfilePropertySettings propertySettings)
{
- throw new NotImplementedException ();
+ BaseAdd (propertySettings);
}
- [MonoTODO]
public void Clear ()
{
- throw new NotImplementedException ();
+ BaseClear ();
}
- [MonoTODO]
protected override ConfigurationElement CreateNewElement ()
{
- throw new NotImplementedException ();
+ return new ProfilePropertySettings ();
}
- [MonoTODO]
public ProfilePropertySettings Get (int index)
{
- throw new NotImplementedException ();
+ return (ProfilePropertySettings) BaseGet (index);
}
- [MonoTODO]
public ProfilePropertySettings Get (string name)
{
- throw new NotImplementedException ();
+ return (ProfilePropertySettings) BaseGet (name);
}
- [MonoTODO]
protected override object GetElementKey (ConfigurationElement element)
{
- throw new NotImplementedException ();
+ return ((ProfilePropertySettings)element).Name;
}
- [MonoTODO]
public string GetKey (int index)
{
- throw new NotImplementedException ();
+ ProfilePropertySettings s = Get (index);
+ if (s == null)
+ return null;
+
+ return s.Name;
}
- [MonoTODO]
public int IndexOf (ProfilePropertySettings propertySettings)
{
- throw new NotImplementedException ();
+ return BaseIndexOf (propertySettings);
}
[MonoTODO]
throw new NotImplementedException ();
}
- [MonoTODO]
public void Remove (string name)
{
- throw new NotImplementedException ();
+ BaseRemove (name);
}
- [MonoTODO]
public void RemoveAt (int index)
{
- throw new NotImplementedException ();
+ BaseRemoveAt (index);
}
- [MonoTODO]
public void Set (ProfilePropertySettings propertySettings)
{
- throw new NotImplementedException ();
+ ProfilePropertySettings existing = Get (propertySettings.Name);
+
+ if (existing == null) {
+ Add (propertySettings);
+ }
+ else {
+ int index = BaseIndexOf (existing);
+ RemoveAt (index);
+ BaseAdd (index, propertySettings);
+ }
}
- [MonoTODO]
public string[ ] AllKeys {
get {
- throw new NotImplementedException ();
+ string[] keys = new string[Count];
+ for (int i = 0; i < Count; i ++)
+ keys[i] = this[i].Name;
+ return keys;
}
}
}
public ProfilePropertySettings this[int index] {
- get { return (ProfilePropertySettings) BaseGet (index); }
- set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
+ get { return Get (index); }
+ set { if (Get (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
}
- [MonoTODO]
public new ProfilePropertySettings this[string name] {
- get {
- throw new NotImplementedException ();
- }
+ get { return Get (name); }
}
- [MonoTODO]
protected override bool ThrowOnDuplicate {
- get {
- throw new NotImplementedException ();
- }
+ get { return false; }
}
}