2017-03-14 09:47:36 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using Newtonsoft.Json;
|
2017-03-22 16:10:46 +01:00
|
|
|
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
2017-03-14 09:47:36 +01:00
|
|
|
|
|
2017-03-22 16:10:46 +01:00
|
|
|
|
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF
|
2017-03-14 09:47:36 +01:00
|
|
|
|
{
|
2017-03-15 18:42:47 -07:00
|
|
|
|
public class IntegrationEventLogEntry
|
2017-03-14 09:47:36 +01:00
|
|
|
|
{
|
2017-03-15 18:42:47 -07:00
|
|
|
|
public IntegrationEventLogEntry(IntegrationEvent @event)
|
2017-03-14 09:47:36 +01:00
|
|
|
|
{
|
|
|
|
|
EventId = @event.Id;
|
|
|
|
|
CreationTime = DateTime.UtcNow;
|
|
|
|
|
EventTypeName = @event.GetType().FullName;
|
|
|
|
|
Content = JsonConvert.SerializeObject(@event);
|
2017-03-15 18:42:47 -07:00
|
|
|
|
State = EventStateEnum.NotPublished;
|
2017-03-14 09:47:36 +01:00
|
|
|
|
TimesSent = 0;
|
|
|
|
|
}
|
|
|
|
|
public Guid EventId { get; private set; }
|
|
|
|
|
public string EventTypeName { get; private set; }
|
|
|
|
|
public EventStateEnum State { get; set; }
|
|
|
|
|
public int TimesSent { get; set; }
|
|
|
|
|
public DateTime CreationTime { get; private set; }
|
|
|
|
|
public string Content { get; private set; }
|
|
|
|
|
}
|
|
|
|
|
}
|