Share via


SPAuditQuery.RestrictToList Method

Restricts the query to events relevant to the specified list.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub RestrictToList ( _
    list As SPList _
)
'Usage
Dim instance As SPAuditQuery
Dim list As SPList

instance.RestrictToList(list)
public void RestrictToList(
    SPList list
)

Parameters

Remarks

Some events, such as ChildMove and ChildDelete, are considered relevant to the list and are included in a query that is restricted to the list, even though they refer indirectly to an event (Move or Delete) that occurred on an item in the list.

If RestrictToListItem is called, the query is restricted to the parent of the item passed to RestrictToListItem and you should not call RestrictToList too.

See Also

Reference

SPAuditQuery Class

SPAuditQuery Members

Microsoft.SharePoint Namespace

Other Resources

Item-Level Auditing with SharePoint Server 2007