EventSource.SendCommand 方法

定義

傳送命令到指定的事件來源。

public:
 static void SendCommand(System::Diagnostics::Tracing::EventSource ^ eventSource, System::Diagnostics::Tracing::EventCommand command, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ commandArguments);
public static void SendCommand (System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventCommand command, System.Collections.Generic.IDictionary<string,string> commandArguments);
public static void SendCommand (System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventCommand command, System.Collections.Generic.IDictionary<string,string?>? commandArguments);
static member SendCommand : System.Diagnostics.Tracing.EventSource * System.Diagnostics.Tracing.EventCommand * System.Collections.Generic.IDictionary<string, string> -> unit
Public Shared Sub SendCommand (eventSource As EventSource, command As EventCommand, commandArguments As IDictionary(Of String, String))

參數

eventSource
EventSource

要傳送命令的目的地事件來源。

command
EventCommand

要傳送的事件命令。

commandArguments
IDictionary<String,String>

事件命令的引數。

備註

呼叫 SendCommand 會將命令轉送至 OnEventCommand 回呼。 使用 EventSource 命令及其自變數的功能是事件來源特有的。 命令和命令自變數會傳遞至 OnEventCommand 指定事件來源的回呼。 可能的話,目前的事件來源不應該影響其他事件接聽項的篩選事件;不過,如果命令造成垃圾收集、系統排清或其他一些全域活動,可能無法達到此狀況。

適用於