System.ComponentModel.MemberDescriptor.GetInvokee C# (CSharp) Method

GetInvokee() private method

private GetInvokee ( Type componentClass, object component ) : object
componentClass Type
component object
return object
        protected static object GetInvokee(Type componentClass, object component) {

            if (componentClass == null)
            {
                throw new ArgumentNullException(nameof(componentClass));
            }

            if (component == null)
            {
                throw new ArgumentNullException(nameof(component));
            }

            return TypeDescriptor.GetAssociation(componentClass, component);
        }
    }

Usage Example

Example #1
0
        public override void SetValue(object component, object value)
        {
            DesignerTransaction tran = CreateTransaction(component, "Set Property '" + Name + "'");

            object propertyHolder = MemberDescriptor.GetInvokee(_componentType, component);
            object old            = GetValue(propertyHolder);

            try {
                GetPropertyInfo().SetValue(propertyHolder, value, null);
                EndTransaction(component, tran, old, value, true);
            } catch {
                EndTransaction(component, tran, old, value, false);
                throw;
            }
        }
All Usage Examples Of System.ComponentModel.MemberDescriptor::GetInvokee