public EventPropertyDescriptor(object component, EventInfo eventInfo, EventHandlerList eventHandlerList) : base(eventInfo.Name) { this.component = component; this.eventInfo = eventInfo; this.eventHandlerList = eventHandlerList; this.converter = new EventInfoConverter(this); }
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { EventInfoConverter eventConverter = component as EventInfoConverter; if (eventConverter != null) { return(eventConverter.GetProperties()); } else { return(PropertyDescriptorUtils.GetInstanceEvents(component)); } }