예제 #1
0
 public UpdateRetroState(Guid retrospectiveId, string participantId, RetrospectiveState state)
     : base(Guid.NewGuid(), -1)
 {
     RetrospectiveId = retrospectiveId;
     ParticipantId   = participantId;
     State           = state;
 }
예제 #2
0
 private void CheckRetrospectiveInDesiredState(RetrospectiveState desiredState)
 {
     if (State != desiredState)
     {
         throw new RetrospectiveIsCollectingSuggestionsException();
     }
 }
예제 #3
0
        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);
        }
예제 #5
0
 public RetrospectiveStateChanged(Guid retrospectiveId, RetrospectiveState targetState)
 {
     RetrospectiveId = retrospectiveId;
     TargetState     = targetState;
 }