SPAudit.Update-Methode
Aktualisiert die SharePoint-Datenbank mit Änderungen der AuditFlags -Eigenschaft
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Update
'Usage
Dim instance As SPAudit
instance.Update()
public void Update()
Hinweise
Rufen Sie Update sofort nach dem Vornehmen von Änderungen an AuditFlags.
Beispiele
Im folgende Beispiel wird veranschaulicht, wie Sie die Überwachungseinstellungen für ein Listenelement zu ändern. (Die item ist ein Objekt vom Typ SPListItem.)
// Turns on auditing of user views of the list item without changing
// any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags | SPAuditMaskType.View);
oListItem.Audit.Update();
// Turns off auditing of user views of the list item without changing
// any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags &
(SPAuditMaskType.All ^ SPAuditMaskType.View));
oListItem.Audit.Update();
// Turns on auditing of all types of events and actions relevant to
// the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.All;
oListItem.Audit.Update();
// Turns off all auditing of the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.None;
oListItem.Audit.Update();
' Turns on auditing of user views of the list item without changing
' any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags Or SPAuditMaskType.View)
oListItem.Audit.Update()
' Turns off auditing of user views of the list item without changing
' any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags And (SPAuditMaskType.All Xor SPAuditMaskType.View))
oListItem.Audit.Update()
' Turns on auditing of all types of events and actions relevant to
' the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.All
oListItem.Audit.Update()
' Turns off all auditing of the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.None
oListItem.Audit.Update()
Siehe auch
Referenz
Microsoft.SharePoint-Namespace