EventSource.SendCommand(EventSource, EventCommand, IDictionary<String,String>) EventSource.SendCommand(EventSource, EventCommand, IDictionary<String,String>) EventSource.SendCommand(EventSource, EventCommand, IDictionary<String,String>) Method

定義

傳送命令到指定的事件來源。Sends a command to a specified event source.

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);
static member SendCommand : System.Diagnostics.Tracing.EventSource * System.Diagnostics.Tracing.EventCommand * System.Collections.Generic.IDictionary<string, string> -> unit

參數

eventSource
EventSource EventSource EventSource

要傳送命令的目的地事件來源。The event source to send the command to.

command
EventCommand EventCommand EventCommand

要傳送的事件命令。The event command to send.

commandArguments
IDictionary<String,String>

事件命令的引數。The arguments for the event command.

備註

呼叫SendCommand會將命令轉送OnEventCommand至回呼。Calling SendCommand forwards the command to the OnEventCommand callback. 命令的EventSource用途和其引數是事件來源特有的。What the EventSource does with the command and its arguments is specific to the event source. 命令和命令引數會傳遞至OnEventCommand指定之事件來源的回呼。The command and command arguments are passed to the OnEventCommand callback of the specified event source. 可能的話, 目前的事件來源應該不會影響其他事件接聽程式的篩選事件;不過, 如果命令造成垃圾收集、系統排清或其他全域活動, 則可能無法這麼做。If possible, the current event source should not affect other event listeners' filtering events; however, that may not be possible if the command causes a garbage collection, a system flush, or some other global activity.

適用於