Name
EventDescriptor
Synopsis
This class, derived from MemberDescriptor,
encapsulates the information about an event. In addition to the base
functionality, you can discover the ComponentType
that declares the event, and the EventType that
describes the delegate for the event. You can also determine whether
the delegate IsMulticast.
AddEventHandler() and
RemoveEventHandler() allow you to control the
binding to the encapsulated event.
public abstract class EventDescriptor : MemberDescriptor { // Protected Constructors protected EventDescriptor(MemberDescriptor descr); protected EventDescriptor(MemberDescriptor descr, Attribute[] attrs); protected EventDescriptor(string name, Attribute[] attrs); // Public Instance Properties public abstract Type ComponentType{get; } public abstract Type EventType{get; } public abstract bool IsMulticast{get; } // Public Instance Methods public abstract void AddEventHandler(object component, Delegate value); public abstract void RemoveEventHandler(object component, Delegate value); }
Hierarchy
System.Object
→ MemberDescriptor → EventDescriptor
Returned By
EventDescriptorCollection.{Find(),
this},
IComNativeDescriptorHandler.GetDefaultEvent(),
ICustomTypeDescriptor.GetDefaultEvent(),
TypeDescriptor.{CreateEvent(),
GetDefaultEvent()}
Passed To
EventDescriptorCollection.{Add(),
Contains(), EventDescriptorCollection( ), IndexOf(),Insert( ), Remove()},
TypeDescriptor.CreateEvent()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access