Редагувати

Поділитися через


EventBindingService.FreeMethod(IComponent, EventDescriptor, String) Method

Definition

Provides a notification that a particular method is no longer being used by an event handler.

protected:
 virtual void FreeMethod(System::ComponentModel::IComponent ^ component, System::ComponentModel::EventDescriptor ^ e, System::String ^ methodName);
protected virtual void FreeMethod (System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e, string methodName);
abstract member FreeMethod : System.ComponentModel.IComponent * System.ComponentModel.EventDescriptor * string -> unit
override this.FreeMethod : System.ComponentModel.IComponent * System.ComponentModel.EventDescriptor * string -> unit
Protected Overridable Sub FreeMethod (component As IComponent, e As EventDescriptor, methodName As String)

Parameters

component
IComponent

The component to which the method is bound.

e
EventDescriptor

The EventDescriptor for the event handler.

methodName
String

The name of the method to be freed.

Remarks

Some implementations may intend to remove the event handler when no events are using it. By overriding UseMethod and FreeMethod, an implementation can infer when a method is no longer needed.

Applies to

See also