EventSource.SendCommand Method

Definition

Sends a command to a specified event source.

C#
public static void SendCommand(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventCommand command, System.Collections.Generic.IDictionary<string,string> commandArguments);
C#
public static void SendCommand(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventCommand command, System.Collections.Generic.IDictionary<string,string?>? commandArguments);

Parameters

eventSource
EventSource

The event source to send the command to.

command
EventCommand

The event command to send.

commandArguments
IDictionary<String,String>

The arguments for the event command.

Remarks

Calling SendCommand forwards the command to the OnEventCommand callback. What the EventSource does with the command and its arguments is specific to the event source. 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.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1
UWP 10.0