* TraceListenerTest.cs: Added test for GetSupportedAttributes.
[mono.git] / mcs / class / System / System.Diagnostics / ProcessThreadCollection.cs
old mode 100755 (executable)
new mode 100644 (file)
index 64a3161..6f950e7
@@ -33,12 +33,37 @@ using System.Collections;
 
 namespace System.Diagnostics 
 {
-       public class ProcessThreadCollection : ReadOnlyCollectionBase 
+#if NET_2_1
+       public class ProcessThreadCollectionBase : System.Collections.Generic.List<ProcessThread>
+       {
+               protected ProcessThreadCollectionBase InnerList {
+                       get { return this; }
+               }
+
+               public new int Add (ProcessThread thread)
+               {
+                       base.Add (thread);
+                       return Count - 1;
+               }
+       }
+#endif
+
+       public class ProcessThreadCollection :
+#if !NET_2_1
+               ReadOnlyCollectionBase
+#else
+               ProcessThreadCollectionBase
+#endif
        {
                protected ProcessThreadCollection() 
                {
                }
 
+               internal static ProcessThreadCollection GetEmpty ()
+               {
+                       return new ProcessThreadCollection ();
+               }
+               
                public ProcessThreadCollection(ProcessThread[] processThreads) 
                {
                        InnerList.AddRange (processThreads);