共用方式為


IAuditLogService.WriteEventAsync 方法

定義

將事件專案寫入 IDE 受控稽核記錄實例。

public System.Threading.Tasks.Task WriteEventAsync(Microsoft.VisualStudio.RpcContracts.Logging.AuditLogEventType eventType, Microsoft.VisualStudio.RpcContracts.Logging.AuditLogSource source, string message, System.Collections.Generic.IReadOnlyDictionary<string,string>? eventData, System.Threading.CancellationToken cancellationToken);
abstract member WriteEventAsync : Microsoft.VisualStudio.RpcContracts.Logging.AuditLogEventType * Microsoft.VisualStudio.RpcContracts.Logging.AuditLogSource * string * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WriteEventAsync (eventType As AuditLogEventType, source As AuditLogSource, message As String, eventData As IReadOnlyDictionary(Of String, String), cancellationToken As CancellationToken) As Task

參數

eventType
AuditLogEventType

正在記錄的事件類型。

source
AuditLogSource

事件的來源,此預先決定的清單會用於稽核監視工具,以快速篩選為已知來源。

message
String

要顯示為事件內容的訊息。

eventData
IReadOnlyDictionary<String,String>

事件中要包含的任何其他數據。

cancellationToken
CancellationToken

要監視的取消令牌。

傳回

提交事件至稽核記錄時完成的工作。

適用於