Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorRodrigo Kumpera <kumpera@gmail.com>2009-08-08 00:01:53 +0400
committerRodrigo Kumpera <kumpera@gmail.com>2009-08-08 00:01:53 +0400
commit0e57ff8832e0480dd28d7d6bd49372d005f55068 (patch)
treec69a9ca19338f96a873285da535dd6a3a6e0159f /mcs/class
parente138e70adc81b46f49289ae5a63ba4290f49b8f7 (diff)
2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
* ListBindingHelper.cs: Fix the 1.0 build by making this type available under that profile. svn path=/trunk/mcs/; revision=139587
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog5
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBindingHelper.cs25
2 files changed, 23 insertions, 7 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index f4b6148ca1a..4721c24fcee 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-07 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ListBindingHelper.cs: Fix the 1.0 build by making this type available
+ under that profile.
+
2009-08-07 Ivan N. Zlatev <contact@i-nz.net>
* CurrencyManager.cs: Remove duplicate code.
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBindingHelper.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBindingHelper.cs
index 6408eee43d0..2200779c5a4 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBindingHelper.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBindingHelper.cs
@@ -29,12 +29,18 @@ using System.ComponentModel;
using System.Reflection;
#if NET_2_0
-
using System.Collections.Generic;
+#endif
namespace System.Windows.Forms
{
- public static class ListBindingHelper
+
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static class ListBindingHelper
{
public static object GetList (object list)
{
@@ -100,7 +106,11 @@ namespace System.Windows.Forms
if (enumerator.MoveNext () && enumerator.Current != null)
return enumerator.Current.GetType ();
- if (dataSource is IList || dataSource.GetType () == typeof (IList<>)) {
+ if (dataSource is IList
+#if NET_2_0
+ || dataSource.GetType () == typeof (IList<>)
+#endif
+ ) {
PropertyInfo property = GetPropertyByReflection (dataSource.GetType (), "Item");
if (property != null) // `Item' could be interface-explicit, and thus private
return property.PropertyType;
@@ -136,8 +146,11 @@ namespace System.Windows.Forms
// Take into account only the first property
Type property_type = listAccessors [0].PropertyType;
- if (typeof (IList).IsAssignableFrom (property_type) ||
- typeof (IList<>).IsAssignableFrom (property_type)) {
+ if (typeof (IList).IsAssignableFrom (property_type)
+#if NET_2_0
+ || typeof (IList<>).IsAssignableFrom (property_type)
+#endif
+ ) {
PropertyInfo property = GetPropertyByReflection (property_type, "Item");
return TypeDescriptor.GetProperties (property.PropertyType);
@@ -187,5 +200,3 @@ namespace System.Windows.Forms
}
}
}
-
-#endif