Browse Source

Merge pull request #819 from erikpique/feature/667

[Bug] Deserialization of IntegrationEvent #667
pull/874/head
RamonTC 6 years ago
committed by GitHub
parent
commit
06de1b68e3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs

+ 13
- 2
src/BuildingBlocks/EventBus/EventBus/Events/IntegrationEvent.cs View File

@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events
{
@ -10,7 +11,17 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events
CreationDate = DateTime.UtcNow;
}
public Guid Id { get; }
public DateTime CreationDate { get; }
[JsonConstructor]
public IntegrationEvent(Guid id, DateTime createDate)
{
Id = id;
CreationDate = createDate;
}
[JsonProperty]
public Guid Id { get; private set; }
[JsonProperty]
public DateTime CreationDate { get; private set; }
}
}

Loading…
Cancel
Save