mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
Removing unecceary EventName requirement. EventSource<T>.Write will use the type name of T if null is passed in. This saves us passing an extra string uneccesarily as the public property would be serialized into the event data as well as being specified as the EventName
This commit is contained in:
@@ -35,9 +35,8 @@ namespace Microsoft.PowerToys.Telemetry
|
||||
/// Publishes ETW event when an action is triggered on
|
||||
/// </summary>
|
||||
public void WriteEvent<T>(T telemetryEvent)
|
||||
where T : IEvent
|
||||
{
|
||||
this.Write<T>(telemetryEvent.EventName, new EventSourceOptions()
|
||||
this.Write<T>(null, new EventSourceOptions()
|
||||
{
|
||||
Keywords = ProjectKeywordMeasure,
|
||||
Tags = ProjectTelemetryTagProductAndServicePerformance,
|
||||
|
||||
Reference in New Issue
Block a user