This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static EventData ToEventData(Guid eventId, object @event, IDictionary<string, object> headers = null) | |
{ | |
if (headers == null) headers = new Dictionary<string, object>(); | |
var serializerSettings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.None }; | |
var data = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(@event, serializerSettings)); | |
var eventHeaders = new Dictionary<string, object>(headers) | |
{ | |
{ |