This documentation is archived and is not being maintained.

SPAuditQuery.AddEventRestriction Method

Windows SharePoint Services 3

Restricts the query to the specified type of event and other event types that were specified with other calls to this method.

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

public void AddEventRestriction(
	SPAuditEventType eventId


Type: Microsoft.SharePoint.SPAuditEventType
An SPAuditEventType object that specifies one of the types of events for which the query returns audit entries.

You can call this method multiple times to include more event types in the query.

If this method is never called, all event types are included in the query.