From aac3ddb44f26f5372be929cc3e8a249542fed505 Mon Sep 17 00:00:00 2001 From: Vance Morrison Date: Thu, 15 Sep 2016 09:30:24 -0700 Subject: [PATCH] Fix one more place where Writing EventSource messages did not initialize all meta-data properly --- .../src/System/Diagnostics/Eventing/EventSource.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs b/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs index bb2332376d..2886056042 100644 --- a/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs +++ b/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs @@ -1390,11 +1390,12 @@ namespace System.Diagnostics.Tracing } else { - List arg = new List(); - arg.Add(msg); EventWrittenEventArgs eventCallbackArgs = new EventWrittenEventArgs(this); eventCallbackArgs.EventId = 0; - eventCallbackArgs.Payload = new ReadOnlyCollection(arg); + eventCallbackArgs.Message = msg; + eventCallbackArgs.Payload = new ReadOnlyCollection(new List() { msg }); + eventCallbackArgs.PayloadNames = new ReadOnlyCollection(new List { "message" }); + eventCallbackArgs.EventName = "EventSourceMessage"; listener.OnEventWritten(eventCallbackArgs); } } -- 2.34.1