Printer Friendly Version      Send     
Click to Rate and Give Feedback
SPAuditEntry Class (Microsoft.SharePoint)
Contains information about an audited event that is connected to a site collection, site, folder, list, or list item.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
Public NotInheritable Class SPAuditEntry
Visual Basic (Usage)
Dim instance As SPAuditEntry
C#
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
public sealed class SPAuditEntry

Most of the properties of SPAuditEntry hold information that is audited for all events (although some of these properties are null for certain kinds of events). The EventData property holds information, as XML markup, that is specific to the particular type of event identified in the Event property.

The following example (from Item-Level Auditing with SharePoint Server 2007) shows this class in use.

C#
SPAuditQuery oAuditQuery = new SPAuditQuery(oSiteCollection);
oAuditQuery.RestrictToListItem(item);
SPAuditEntryCollection collAuditEntries = oSiteCollection.Audit.GetEntries(oAuditQuery);

foreach (SPAuditEntry oAuditEntry in collAuditEntries) {
  // get info from audit log
}
System.Object
  Microsoft.SharePoint.SPAuditEntry
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker