Exemplo n.º 1
0
 public void Handle(BoardCreated cmd)
 {
     WithState(list => {
         list.Add(new BoardSummary()
         {
             Id   = cmd.AggregateId,
             Name = cmd.Name
         });
         return(list);
     });
 }
Exemplo n.º 2
0
 public void Handle(BoardCreated e)
 {
     WithState(e.AggregateId, x =>
               new Board()
     {
         Id    = e.AggregateId,
         Name  = e.Name,
         Lanes = e.LaneNames.Select((lane, index) =>
                                    new Lane()
         {
             Id    = index,
             Name  = lane,
             Cards = new List <CardSummary>()
         }).ToList()
     });
 }
 public void OnBoardCreated()
 {
     BoardCreated?.Invoke();
 }
Exemplo n.º 4
0
 public void When(BoardCreated boardCreated)
 {
     BoardId = boardCreated.BoardId;
     Name    = boardCreated.Name;
 }
Exemplo n.º 5
0
 private Board(BoardCreated boardCreated)
     : this()
 {
     Apply(boardCreated);
 }
Exemplo n.º 6
0
 public void Apply(BoardCreated @event)
 {
     Name = @event.BoardName;
     UserIds.Add(@event.UserId);
 }
Exemplo n.º 7
0
 private void Apply(BoardCreated e)
 {
     _board = new Board(e.BoardSize);
 }