BUG FIX: Modification to LogEventInfo.Properties While Iterating

I modified the loop here to use the keys of the logEventParameter.Properties collection instead of the collection itself. Modifying a collection while iterating over it causes an error. In addition, as you can see, the previous version removed the item according to its key and then tried to add it back. This was obviously not the intent.

Using LogEventInfo.Properties["myKey"] = "myValue" when logging a message is broken in all use cases right now until this change is applied. That's how I found this.