写入审核项自定义的用户 id。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Function WriteAuditEvent ( _
eventName As String, _
eventSource As String, _
userId As Integer, _
xmlData As String _
) As Boolean
用法
Dim instance As SPAudit
Dim eventName As String
Dim eventSource As String
Dim userId As Integer
Dim xmlData As String
Dim returnValue As Boolean
returnValue = instance.WriteAuditEvent(eventName, _
eventSource, userId, xmlData)
public bool WriteAuditEvent(
string eventName,
string eventSource,
int userId,
string xmlData
)
参数
eventName
类型:System.String事件的名称。
eventSource
类型:System.String调用应用程序的名称。
userId
类型:System.Int32自定义的用户 id。
xmlData
类型:System.String有关事件的信息。
返回值
类型:System.Boolean
true如果成功,则记录该事件否则为false。
备注
仅在系统帐户能够指定用户 id。所有其他用户尝试指定不同的 Id,其自己从被视为欺骗,被终止。