Author: atsushi
Date: 2007-09-27 14:10:32 -0400 (Thu, 27 Sep 2007)
New Revision: 86524
Modified:
trunk/mcs/class/System/System.ComponentModel/ChangeLog
trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
Log:
2007-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
* TypeDescriptor.cs : added missing ObsoleteAttribute.
* MemberDescriptor.cs, PropertyDescriptor.cs :
implemented GetInvocationTarget().
Modified: trunk/mcs/class/System/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-09-27
18:06:42 UTC (rev 86523)
+++ trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-09-27
18:10:32 UTC (rev 86524)
@@ -1,3 +1,9 @@
+2007-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * TypeDescriptor.cs : added missing ObsoleteAttribute.
+ * MemberDescriptor.cs, PropertyDescriptor.cs :
+ implemented GetInvocationTarget().
+
2007-09-25 Jonathan Pobst <[EMAIL PROTECTED]>
* AsyncOperationManager.cs: Tie the SynchronizationContext here to
Modified: trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
2007-09-27 18:06:42 UTC (rev 86523)
+++ trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
2007-09-27 18:10:32 UTC (rev 86524)
@@ -220,9 +220,9 @@
return null;
}
-//#if NET_2_0 // uncomment when it is implemented
-// [Obsolete ("Use GetInvocationTarget")]
-//#endif
+#if NET_2_0 // uncomment when it is implemented
+ [Obsolete ("Use GetInvocationTarget")]
+#endif
protected static object GetInvokee(Type componentClass, object
component)
{
if (component is IComponent) {
@@ -241,10 +241,14 @@
}
#if NET_2_0
- [MonoNotSupported("")]
protected virtual object GetInvocationTarget (Type type, object
instance)
{
- throw new NotImplementedException ();
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ if (instance == null)
+ throw new ArgumentNullException ("instance");
+
+ return GetInvokee (type, instance);
}
#endif
Modified: trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
2007-09-27 18:06:42 UTC (rev 86523)
+++ trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
2007-09-27 18:10:32 UTC (rev 86524)
@@ -171,9 +171,18 @@
base.FillAttributes (attributeList);
}
- [MonoNotSupported ("")]
- protected override Object GetInvocationTarget (Type type,
object instance)
+ protected override object GetInvocationTarget (Type type,
object instance)
{
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ if (instance == null)
+ throw new ArgumentNullException ("instance");
+
+ if (instance is CustomTypeDescriptor) {
+ CustomTypeDescriptor ctd =
(CustomTypeDescriptor) instance;
+ return ctd.GetPropertyOwner (this);
+ }
+
return base.GetInvocationTarget (type, instance);
}
Modified: trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
2007-09-27 18:06:42 UTC (rev 86523)
+++ trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
2007-09-27 18:10:32 UTC (rev 86524)
@@ -775,6 +775,10 @@
infos.Add (ob);
}
+#if NET_2_0
+ // well, ComObjectType is not implemented, but we don't support COM
anyways ...
+ [Obsolete ("Use ComObjectType")]
+#endif
public static IComNativeDescriptorHandler ComNativeDescriptorHandler {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
get { return descriptorHandler; }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches