SPEventReceiverDefinition.FireContextEvent method

Executes the event receiver, either synchronously or asynchronously.

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

Syntax

'Declaration
Public Sub FireContextEvent ( _
    site As SPSite _
)
'Usage
Dim instance As SPEventReceiverDefinition
Dim site As SPSite

instance.FireContextEvent(site)
public void FireContextEvent(
    SPSite site
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

There are no item event properties for the site.

-or-

The event that was just received by the event host is not a context event.

Remarks

Users perform actions such as delete, update, check in, or convert on Microsoft SharePoint Foundation objects. When a SharePoint Foundation object has some action performed on it by the user, the object fires an event for the context. This event must be received by the event host within the SharePoint Foundation farm for processing.

The event receiver sends information to the event host when the context event is generated. The assembly name and class name are used by the event host to locate the receiver to execute. The user action is the name of the SPEventReceiverType, such as ItemCheckedIn. The receiver type name indicates whether synchronous or asynchronous processing should be used. Other information required to meet the user request is sent with the event as item property objects.

See also

Reference

SPEventReceiverDefinition class

SPEventReceiverDefinition members

Microsoft.SharePoint namespace

SPItemEventProperties

SPWorkflowLibraryEventReceiver