start populating the new System.Web.Configuration_2.0 dir
[mono.git] / mcs / class / corlib / System.Runtime.Remoting.Channels / ChannelServices.cs
index 124d01a44294f656c7278191d65f4bf86d5acec5..e2ab7935e9c8c14070052e930f16ade2fa575782 100644 (file)
@@ -144,12 +144,15 @@ namespace System.Runtime.Remoting.Channels
                        get {
                                lock (registeredChannels.SyncRoot)
                                {
-                                       IChannel[] channels = new IChannel[registeredChannels.Count];
-       
-                                       for (int i = 0; i < registeredChannels.Count; i++)
-                                               channels[i] = (IChannel) registeredChannels[i];
-       
-                                       return channels;
+                                       ArrayList list = new ArrayList ();
+                                       
+                                       for (int i = 0; i < registeredChannels.Count; i++) {
+                                               IChannel ch = (IChannel) registeredChannels[i];
+                                               if (ch is CrossAppDomainChannel) continue;
+                                               list.Add (ch);
+                                       }
+
+                                       return (IChannel[]) list.ToArray (typeof(IChannel));
                                }
                        }
                }