2006-03-29 Marek Sieradzki <marek.sieradzki@gmail.com>
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / ImportCollection.cs
index 762ad875c44157c0bd93ae487696d293b6e2eae3..ff0e6b48cfff76b2af4c22d0d84f3640cc6e859a 100644 (file)
@@ -35,13 +35,13 @@ using System.Xml;
 namespace Microsoft.Build.BuildEngine {
        public class ImportCollection : ICollection, IEnumerable {
                
-               IDictionary     imports;
+               IList           imports;
                Project         parentProject;
                
                internal ImportCollection (Project parentProject)
                {
                        this.parentProject = parentProject;
-                       this.imports = new Hashtable ();
+                       this.imports = new ArrayList ();
                }
                
                internal void Add (Import import)
@@ -49,10 +49,10 @@ namespace Microsoft.Build.BuildEngine {
                        if (import == null)
                                throw new ArgumentNullException ("import");
                        
-                       if (imports.Contains (import.EvaluatedProjectPath))
+                       if (imports.Contains (import))
                                throw new InvalidOperationException ("Import already added.");
                        
-                       imports.Add (import.EvaluatedProjectPath, import);
+                       imports.Add (import);
                }
                
                [MonoTODO]
@@ -79,14 +79,10 @@ namespace Microsoft.Build.BuildEngine {
                        get { return false; }
                }
                
-               internal Import this [string index] {
-                       get { return (Import) imports [index]; }
-               }
-               
                public object SyncRoot {
                        get { return this; }
                }
        }
 }
 
-#endif
\ No newline at end of file
+#endif