C# Class System.ComponentModel.ReflectEventDescriptor

Inheritance: System.ComponentModel.EventDescriptor
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
AddEventHandler ( object component, Delegate value ) : void

This adds the delegate value as a listener to when this event is fired by the component, invoking the addOnXXX method.

ReflectEventDescriptor ( Type componentType, System.ComponentModel.EventDescriptor oldReflectEventDescriptor, Attribute attributes ) : System.Collections

This constructor takes an existing ReflectEventDescriptor and modifies it by merging in the passed-in attributes.

ReflectEventDescriptor ( Type componentClass, EventInfo eventInfo ) : System.Collections
ReflectEventDescriptor ( Type componentClass, string name, Type type, Attribute attributes ) : System.Collections

This is the main constructor for an ReflectEventDescriptor.

RemoveEventHandler ( object component, Delegate value ) : void

This will remove the delegate value from the event chain so that it no longer gets events from this component.

Protected Methods

Method Description
FillAttributes ( IList attributes ) : void

Private Methods

Method Description
FillEventInfoAttribute ( EventInfo realEventInfo, IList attributes ) : void
FillMethods ( ) : void

This fills the get and set method fields of the event info. It is shared by the various constructors.

FillSingleMethodAttribute ( MethodInfo realMethodInfo, IList attributes ) : void

Method Details

AddEventHandler() public method

This adds the delegate value as a listener to when this event is fired by the component, invoking the addOnXXX method.
public AddEventHandler ( object component, Delegate value ) : void
component object
value System.Delegate
return void

FillAttributes() protected method

protected FillAttributes ( IList attributes ) : void
attributes IList
return void

ReflectEventDescriptor() public method

This constructor takes an existing ReflectEventDescriptor and modifies it by merging in the passed-in attributes.
public ReflectEventDescriptor ( Type componentType, System.ComponentModel.EventDescriptor oldReflectEventDescriptor, Attribute attributes ) : System.Collections
componentType System.Type
oldReflectEventDescriptor System.ComponentModel.EventDescriptor
attributes System.Attribute
return System.Collections

ReflectEventDescriptor() public method

public ReflectEventDescriptor ( Type componentClass, EventInfo eventInfo ) : System.Collections
componentClass System.Type
eventInfo System.Reflection.EventInfo
return System.Collections

ReflectEventDescriptor() public method

This is the main constructor for an ReflectEventDescriptor.
public ReflectEventDescriptor ( Type componentClass, string name, Type type, Attribute attributes ) : System.Collections
componentClass System.Type
name string
type System.Type
attributes System.Attribute
return System.Collections

RemoveEventHandler() public method

This will remove the delegate value from the event chain so that it no longer gets events from this component.
public RemoveEventHandler ( object component, Delegate value ) : void
component object
value System.Delegate
return void