DekGenius.com
[ Team LiB ] Previous Section Next Section

EventDescriptor

System.ComponentModel (system.dll)abstract class

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()

    [ Team LiB ] Previous Section Next Section