Пример #1
0
        public static string CreateMessageFrom(DomainEventEnvelope evt)
        {
            var domainEvent = JsonConvert.DeserializeObject <ExpandoObject>(evt.Data);
            var message     = new Message(
                version: "1",
                eventName: evt.Type,
                xCorrelationId: "",
                xSender: Assembly.GetExecutingAssembly().FullName,
                payload: domainEvent
                );

            return(JsonConvert.SerializeObject(message, new JsonSerializerSettings()
            {
                ContractResolver = new CamelCasePropertyNamesContractResolver()
            }));
        }
Пример #2
0
 public void AddEventToQueue(DomainEventEnvelope iEvent)
 {
     _events.Enqueue(iEvent);
 }