diff options
author | Andreas N <andreas@mono-cvs.ximian.com> | 2003-07-10 20:57:34 +0400 |
---|---|---|
committer | Andreas N <andreas@mono-cvs.ximian.com> | 2003-07-10 20:57:34 +0400 |
commit | 3bc45899693a7d6379ee3ccf90349bb1b7b7baeb (patch) | |
tree | 7acc0aa18365ec25a06be8d8f259bd7dab3a8309 /mcs/class/System/System.Collections.Specialized | |
parent | fd1549e5ea23d1d8d3abb95894b6d4391307fcbe (diff) |
2003-07-10 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* NameObjectCollectionBase.cs: Implemented a few missing methods, fixed public signatures
svn path=/trunk/mcs/; revision=16108
Diffstat (limited to 'mcs/class/System/System.Collections.Specialized')
-rwxr-xr-x | mcs/class/System/System.Collections.Specialized/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs | 36 |
2 files changed, 21 insertions, 19 deletions
diff --git a/mcs/class/System/System.Collections.Specialized/ChangeLog b/mcs/class/System/System.Collections.Specialized/ChangeLog index 304b1ef81ea..4df2475ccf9 100755 --- a/mcs/class/System/System.Collections.Specialized/ChangeLog +++ b/mcs/class/System/System.Collections.Specialized/ChangeLog @@ -1,3 +1,7 @@ +2003-07-10 Andreas Nahr <ClassDevelopment@A-SoftTech.com> + + * NameObjectCollectionBase.cs: Implemented a few missing methods, fixed public signatures + 2003-07-09 Andreas Nahr <ClassDevelopment@A-SoftTech.com> * NameObjectCollectionBase.cs: Fixed signature to be CLSCompliant, changed/corrected header diff --git a/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs b/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs index 8e862c3edce..b8a9be92e5d 100644 --- a/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs +++ b/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs @@ -3,6 +3,7 @@ // // Author: // Gleb Novodran +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) Ximian, Inc. http://www.ximian.com //
@@ -81,7 +82,8 @@ namespace System.Collections.Specialized /// <summary>
/// SDK: Represents a collection of the String keys of a collection.
- /// </summary>
+ /// </summary> + [Serializable]
public class KeysCollection : ICollection, IEnumerable
{
private NameObjectCollectionBase m_collection;
@@ -97,12 +99,7 @@ namespace System.Collections.Specialized }
// ICollection methods -----------------------------------
- /// <summary>
- ///
- /// </summary>
- /// <param name="arr"></param>
- /// <param name="index"></param>
- public virtual void /*ICollection*/ CopyTo(Array arr, int index)
+ void ICollection.CopyTo(Array arr, int index)
{
if (arr==null)
throw new ArgumentNullException("array can't be null");
@@ -115,16 +112,16 @@ namespace System.Collections.Specialized }
}
- public virtual bool IsSynchronized
+ bool ICollection.IsSynchronized
{
get{
- throw new Exception("Not implemented yet");
+ return false;
}
}
- public virtual object SyncRoot
+ object ICollection.SyncRoot
{
get{
- throw new Exception("Not implemented yet");
+ return m_collection;
}
}
/// <summary>
@@ -138,9 +135,8 @@ namespace System.Collections.Specialized }
}
- [MonoTODO]
public string this [int index] {
- get { throw new NotImplementedException (); }
+ get { return Get (index); }
}
// IEnumerable methods --------------------------------
@@ -385,16 +381,18 @@ namespace System.Collections.Specialized allValues[i] = BaseGet(i);
return allValues;
-// throw new Exception("Not implemented yet");
- }
- [MonoTODO]
+ } +
protected object[] BaseGetAllValues( Type type )
{
if (type == null)
throw new ArgumentNullException("'type' argument can't be null");
- // TODO: implements this
-
- throw new Exception("Not implemented yet");
+ int cnt = m_ItemsArray.Count;
+ object[] allValues = (object[]) Array.CreateInstance (type, cnt);
+ for(int i=0; i<cnt; i++)
+ allValues[i] = BaseGet(i);
+
+ return allValues;
}
protected string BaseGetKey( int index )
|