adding in stylecop goodness (#5301)

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-30 12:17:08 -07:00
committed by GitHub
parent ff93b38d23
commit d032956124
8 changed files with 73 additions and 29 deletions

View File

@@ -2,9 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.PowerToys.Telemetry.Events;
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry.Events;
namespace Microsoft.PowerToys.Telemetry
{
@@ -13,7 +12,6 @@ namespace Microsoft.PowerToys.Telemetry
/// </summary>
public class PowerToysTelemetry : TelemetryBase
{
/// <summary>
/// Name for ETW event.
/// </summary>
@@ -30,20 +28,22 @@ namespace Microsoft.PowerToys.Telemetry
/// <summary>
/// Gets an instance of the <see cref="PowerLauncherTelemetry"/> class.
/// </summary>
public static PowerToysTelemetry Log = new PowerToysTelemetry();
public static PowerToysTelemetry Log { get; } = new PowerToysTelemetry();
/// <summary>
/// Publishes ETW event when an action is triggered on
/// Publishes ETW event when an action is triggered on
/// </summary>
public void WriteEvent<T>(T telemetryEvent)
where T : EventBase, IEvent
{
this.Write<T>(null, new EventSourceOptions()
{
Keywords = ProjectKeywordMeasure,
Tags = ProjectTelemetryTagProductAndServicePerformance,
},
telemetryEvent);
this.Write<T>(
null,
new EventSourceOptions()
{
Keywords = ProjectKeywordMeasure,
Tags = ProjectTelemetryTagProductAndServicePerformance,
},
telemetryEvent);
}
}
}