* TypeDescriptor.cs : added missing ObsoleteAttribute.
* MemberDescriptor.cs, PropertyDescriptor.cs :
implemented GetInvocationTarget().
svn path=/trunk/mcs/; revision=86524
+2007-09-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TypeDescriptor.cs : added missing ObsoleteAttribute.
+ * MemberDescriptor.cs, PropertyDescriptor.cs :
+ implemented GetInvocationTarget().
+
2007-09-25 Jonathan Pobst <monkey@jpobst.com>
* AsyncOperationManager.cs: Tie the SynchronizationContext here to
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) {
}
#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
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);
}
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; }