Partager via


FilterConsumerInitEventHandler Delegate

NOTE: This API is now obsolete.

Represents the method that will handle the FilterConsumerInit event fired by a Web Part that implements the IFilterConsumer interface.

Namespace:  Microsoft.SharePoint.WebPartPages.Communication
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Public Delegate Sub FilterConsumerInitEventHandler ( _
    sender As Object, _
    e As FilterConsumerInitEventArgs _
)

Dim instance As New FilterConsumerInitEventHandler(AddressOf HandlerMethod)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
public delegate void FilterConsumerInitEventHandler(
    Object sender,
    FilterConsumerInitEventArgs e
)

Parameters

  • sender
    Type: System.Object
    The source of the event, the Web Part.

Remarks

When you create a FilterConsumerInitEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Examples

The following code example shows the declaration of an event of type FilterConsumerInitEventHandler from a WebPartclass that implements the IFilterConsumer interface. A code sample that shows the implementation of the event handler is in the FilterConsumerInit event topic. A code sample that shows the full implementation of the IFilterConsumer interface is in the IFilterConsumer topic.

' Step #3: Declare the IFilterConsumer Event
' Because this class implements the IFilterConsumer interface, it must 
' declare the interface member FilterConsumerInit. 

Public Event FilterConsumerInit As FilterConsumerInitEventHandler Implements IFilterConsumer.FilterConsumerInit
// Step #3: Declare the IFilterConsumer Event
// Because this class implements the IFilterConsumer interface, it must 
// declare the interface member FilterConsumerInit. 

public event FilterConsumerInitEventHandler FilterConsumerInit;

See Also

Reference

Microsoft.SharePoint.WebPartPages.Communication Namespace