public UpdateRetroState(Guid retrospectiveId, string participantId, RetrospectiveState state) : base(Guid.NewGuid(), -1) { RetrospectiveId = retrospectiveId; ParticipantId = participantId; State = state; }
private void CheckRetrospectiveInDesiredState(RetrospectiveState desiredState) { if (State != desiredState) { throw new RetrospectiveIsCollectingSuggestionsException(); } }
public void UpdateRetroState(string participantId, RetrospectiveState state) { CheckParticipant(participantId); CheckOwner(participantId); if (State == RetrospectiveState.Done) { throw new RetrospectiveIsInDoneState(); } ApplyChange(new RetrospectiveStateChanged(Id, state)); }
public async Task <IActionResult> UpdateRetroState(string participantId, Guid retrospectiveId, RetrospectiveState state) { var cmd = new UpdateRetroState(retrospectiveId, participantId, state); await _cmdSender.Send(cmd); var response = RedirectToAction("Get", new { retrospectiveId = retrospectiveId }); return(response); }
public RetrospectiveStateChanged(Guid retrospectiveId, RetrospectiveState targetState) { RetrospectiveId = retrospectiveId; TargetState = targetState; }