[doc] Document CurrentCultureInfo
[mono.git] / mcs / class / System.DirectoryServices / System.DirectoryServices / SearchResultCollection.cs
index 906de6a9720f5848a661c2c16c4d5281fa180084..bb3d5c031fac37c4a1b08c8a987f9d7a6e078de2 100644 (file)
@@ -47,39 +47,42 @@ namespace System.DirectoryServices
        /// </remarks>
        public class SearchResultCollection : MarshalByRefObject, ICollection, IEnumerable, IDisposable
        {
-               protected ArrayList m_oKeys = new ArrayList();
-               protected Hashtable m_oValues = new Hashtable();
+               private ArrayList sValues = new ArrayList();
 
-               internal PropertyCollection()
+               internal SearchResultCollection()
                {
                }
+               
                public int Count
                {
-                       get{return m_oValues.Count;}
+                       get{return sValues.Count;}
                }
 
-               public bool IsSynchronized
+               bool ICollection.IsSynchronized
                {
-                       get{return m_oValues.IsSynchronized;}
+                       get{return sValues.IsSynchronized;}
                }
 
-               public object SyncRoot
+               object ICollection.SyncRoot
                {
-                       get{return m_oValues.SyncRoot;}
+                       get{return sValues.SyncRoot;}
                }
         
-               public void CopyTo(System.Array oArray, int iArrayIndex)
+               void ICollection.CopyTo(System.Array oArray, int iArrayIndex)
                {
-                       m_oValues.CopyTo(oArray, iArrayIndex);
+                       sValues.CopyTo(oArray, iArrayIndex);
                }
 
-
-               public void Add(object oKey, object oValue)
+               public void CopyTo(SearchResult[] results, int index)
                {
-                       m_oKeys.Add(oKey);
-                       m_oValues.Add(oKey, oValue);
+                       ((ICollection) this).CopyTo((System.Array)results,index);
                }
 
+               internal void Add(object oValue)
+               {
+                       sValues.Add(oValue);
+               }
+/*
                public bool IsFixedSize
                {
                        get{return m_oKeys.IsFixedSize;}
@@ -121,45 +124,70 @@ namespace System.DirectoryServices
                        m_oValues.Remove(oKey);
                        m_oKeys.Remove(oKey);
                }
-        
+       
                public object this[object oKey]
                {
                        get{return m_oValues[oKey];}
                        set{m_oValues[oKey] = value;}
                }
+*/
+               bool Contains(object oValues)
+               {
+                       return sValues.Contains(oValues);
+               }
+
+               public bool Contains (SearchResult result)
+               {
+                       return sValues.Contains (result);
+               }
+
+               public SearchResult this[int index]
+               {
+                       get{return (SearchResult)sValues[index];}
+               }
 
-               public ICollection Values
+/*             public ICollection Values
                {
                        get{return m_oValues.Values;}
                }
+*/
+               public int IndexOf (SearchResult result)
+               {
+                       return sValues.IndexOf(result);
+               }
 
-               IEnumerator IEnumerable.GetEnumerator()
+               public IEnumerator GetEnumerator()
                {
-                       return m_oValues.GetEnumerator();
+                       return sValues.GetEnumerator();
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
                }
 
-               void IDisposable.Dispose ()
+               [MonoTODO]
+               protected virtual void Dispose (bool disposing)
                {
                }
 
-               public  SearchResult  this[int index] 
+               public string[] PropertiesLoaded
                {
-                       get 
-                       {
-                               if(Contains(propertyName))
-                               {
-                                       return (PropertyValueCollection)m_oValues[propertyName];
-                               }
-                               else
-                               {
-                                       PropertyValueCollection _pValColl=new PropertyValueCollection();
-                                       Add((string)propertyName, (PropertyValueCollection)_pValColl);
-                                       return _pValColl;                                       
-                               }
-//                             throw new InvalidOperationException();
-                       }
+                       [MonoTODO]
+                       get { throw new NotImplementedException (); }
                }
 
+               public IntPtr Handle
+               {
+                       [MonoTODO]
+                       get { throw new NotImplementedException (); }
+               }
+
+               ~SearchResultCollection ()
+               {
+                       Dispose (false);
+               }
        }
 }