private static bool IsEtwEventEnabled(DiagnosticTrace trace, int eventIndex)
 {
     TraceCore.EnsureEventDescriptors();
     return(trace.IsEtwEventEnabled(ref TraceCore.eventDescriptors[eventIndex]));
 }
 private static void WriteTraceSource(DiagnosticTrace trace, int eventIndex, string description, TracePayload payload)
 {
     TraceCore.EnsureEventDescriptors();
     trace.WriteTraceSource(ref TraceCore.eventDescriptors[eventIndex], description, payload);
 }