Esempio n. 1
0
 public ExternalSystemPost(PostId id, ExternalSystemPostId externalSystemPostId)
 {
     Apply(new ExternalSystemPostCreated
     {
         Id = id,
         ExternalSystemPostId   = externalSystemPostId.Value.Id,
         ExternalSystemPostType = externalSystemPostId.Value.Type.ToString()
     });
 }
Esempio n. 2
0
 protected override void When(object @event)
 {
     base.When(@event);
     switch (@event)
     {
     case ExternalSystemPostCreated e:
         Id = new PostId(e.Id);
         ExternalSystemPostId = new ExternalSystemPostId((e.ExternalSystemPostId, Enum.Parse <ExternalSystemPostType>(e.ExternalSystemPostType)));
         break;
     }
 }