System.ComponentModel.PropertyDescriptor.GetInvocationTarget C# (CSharp) Méthode

GetInvocationTarget() protected méthode

This method returns the object that should be used during invocation of members. Normally the return value will be the same as the instance passed in. If someone associated another object with this instance, or if the instance is a custom type descriptor, GetInvocationTarget may return a different value.
protected GetInvocationTarget ( Type type, object instance ) : object
type System.Type
instance object
Résultat object
        protected override object GetInvocationTarget(Type type, object instance)
        {
            object target = base.GetInvocationTarget(type, instance);
            ICustomTypeDescriptor td = target as ICustomTypeDescriptor;
            if (td != null)
            {
                target = td.GetPropertyOwner(this);
            }

            return target;
        }