in System.Diagnostics:
authorJb Evain <jbevain@gmail.com>
Fri, 3 Aug 2007 17:32:44 +0000 (17:32 -0000)
committerJb Evain <jbevain@gmail.com>
Fri, 3 Aug 2007 17:32:44 +0000 (17:32 -0000)
2007-08-03  Jb Evain  <jbevain@novell.com>

* ProcessThreadCollection.cs
  ProcessModuleCollection.cs: use our own collection base
  for the 2.1 profile, as ReadOnlyCollectionBase does not exist
  in 2.1, and they are internalized by the linker.

in System.ComponentModel:

2007-08-03  Jb Evain  <jbevain@novell.com>

* ComponentCollection.cs: use our own collection base
  for the 2.1 profile, as ReadOnlyCollectionBase does not exist
  in 2.1, and they are internalized by the linker.

svn path=/trunk/mcs/; revision=83421

mcs/class/System/System.ComponentModel/ChangeLog
mcs/class/System/System.ComponentModel/ComponentCollection.cs
mcs/class/System/System.Diagnostics/ChangeLog
mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs

index 81b99c0ea526df4ab22c44ffc1cf36e99968cbe4..6bd46073a20264bb30b1266efe8368dc95af046d 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-03  Jb Evain  <jbevain@novell.com>
+
+       * ComponentCollection.cs: use our own collection base
+         for the 2.1 profile, as ReadOnlyCollectionBase does not exist
+         in 2.1, and they are internalized by the linker.
+
 2007-08-01  Atsushi Enomoto  <atsushi@ximian.com>
 
        * BackgroundWorker.cs : remove extra MonoTODOs.
index 45c686d3b6c9cad08d38929d3a328eca332a1068..fddf04c6847eff1435c181a9660f90a5e9834e78 100644 (file)
@@ -37,9 +37,24 @@ using System.Runtime.InteropServices;
 using System.Reflection;
 
 namespace System.ComponentModel {
-       [ComVisible (true)]
-       public class ComponentCollection : ReadOnlyCollectionBase {
 
+#if NET_2_1
+       public class ComponentCollectionBase : System.Collections.Generic.List<IComponent>
+       {
+               protected ComponentCollectionBase InnerList {
+                       get { return this; }
+               }
+       }
+#endif
+
+       [ComVisible (true)]
+       public class ComponentCollection :
+#if !NET_2_1
+               ReadOnlyCollectionBase
+#else
+               ComponentCollectionBase
+#endif
+       {
                #region Constructors
 
                public ComponentCollection (IComponent[] components)
index 818ebb6a2b6d2190be3da03b799586044470e480..4a066f84b1afdb46e592f46a300129b4a333619f 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-03  Jb Evain  <jbevain@novell.com>
+
+       * ProcessThreadCollection.cs
+         ProcessModuleCollection.cs: use our own collection base
+         for the 2.1 profile, as ReadOnlyCollectionBase does not exist
+         in 2.1, and they are internalized by the linker.
+
 2007-08-02  Atsushi Enomoto  <atsushi@ximian.com>
 
        * EventLogTraceListener.cs : fixed wrong 2.0 dependency in 1.x.
index db11deedd4679b3069774510d95d66b4adb4a660..7a29e8f83e3241b6d242f88239a5ca806f30fa87 100644 (file)
@@ -33,9 +33,22 @@ using System.Collections;
 
 namespace System.Diagnostics 
 {
-       public class ProcessModuleCollection : ReadOnlyCollectionBase 
+#if NET_2_1
+       public class ProcessModuleCollectionBase : System.Collections.Generic.List<ProcessModule>
+       {
+               protected ProcessModuleCollectionBase InnerList {
+                       get { return this; }
+               }
+       }
+#endif
+
+       public class ProcessModuleCollection :
+#if !NET_2_1   
+               ReadOnlyCollectionBase
+#else
+               ProcessModuleCollectionBase
+#endif
        {
-               
                protected ProcessModuleCollection() 
                {
                }
index 64a3161d6426fa6ea97fc5a40b768c56c154250e..4e24ecc29e89189f97dfe287359ee4d5105bed02 100644 (file)
@@ -33,7 +33,27 @@ 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() 
                {