Forgot this in changelog
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / BuildItemGroupCollection.cs
index b0a450d70264fda33690e5a8f93d034a85ea357b..c886dbd6f90a3b255b91ce547fb92dab41a804fd 100644 (file)
@@ -31,16 +31,16 @@ using System;
 using System.Collections;
 
 namespace Microsoft.Build.BuildEngine {
-       public class BuildItemGroupCollection : IBuildItemGroupCollection, ICollection, IEnumerable {
+       public class BuildItemGroupCollection : ICollection, IEnumerable {
                        
                GroupingCollection      groupingCollection;
                
-               public BuildItemGroupCollection ()
+               private BuildItemGroupCollection ()
                {
-                       groupingCollection = new GroupingCollection ();
+                       groupingCollection = new GroupingCollection (null);
                }
 
-               public BuildItemGroupCollection (GroupingCollection groupingCollection)
+               internal BuildItemGroupCollection (GroupingCollection groupingCollection)
                {
                        this.groupingCollection = groupingCollection;
                }
@@ -50,13 +50,14 @@ namespace Microsoft.Build.BuildEngine {
                        if (array == null)
                                throw new ArgumentNullException ("array");
                        if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index");
+                               throw new 
+                                       IndexOutOfRangeException ("Index was outside the bounds of the array.");
                        if (array.Rank > 1)
                                throw new ArgumentException ("array is multidimensional");
                        if ((array.Length > 0) && (index >= array.Length))
-                               throw new ArgumentException ("index is equal or greater than array.Length");
+                               throw new IndexOutOfRangeException ("Index was outside the bounds of the array.");
                        if (index + this.Count > array.Length)
-                               throw new ArgumentException ("Not enough room from index to end of array for this BuildItemGroupCollection");
+                               throw new IndexOutOfRangeException ("Not enough room from index to end of array for this BuildItemGroupCollection");
                
                        IEnumerator it = GetEnumerator ();
                        int i = index;
@@ -65,27 +66,6 @@ namespace Microsoft.Build.BuildEngine {
                        }
                }
 
-               public void CopyToStronglyTypedArray (BuildItemGroup[] array,
-                                                     int index)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index");
-                       if (array.Rank > 1)
-                               throw new ArgumentException ("array is multidimensional");
-                       if ((array.Length > 0) && (index >= array.Length))
-                               throw new ArgumentException ("index is equal or greater than array.Length");
-                       if (index + this.Count > array.Length)
-                               throw new ArgumentException ("Not enough room from index to end of array for this BuildPropertyGroupCollection");
-               
-                       IEnumerator it = GetEnumerator ();
-                       int i = index;
-                       while (it.MoveNext ()) {
-                               array.SetValue((BuildItemGroup) it.Current, i++);
-                       }
-               }
-
                public IEnumerator GetEnumerator ()
                {
                        return groupingCollection.GetItemGroupEnumerator ();
@@ -117,4 +97,4 @@ namespace Microsoft.Build.BuildEngine {
        }
 }
 
-#endif
\ No newline at end of file
+#endif