Beispiel #1
0
        public async Task <ExecutionDetail> Handle(GetStoryExecutionQuery request, CancellationToken cancellationToken = default)
        {
            var story = await _StoryRepository.GetStory(request.StoryId, true);

            story.Validate();

            var moves = await _StepRepository.GetAllMoves(request.SessionId);

            ValidateMoves(moves);

            var detail = new ExecutionDetail
            {
                Highlight = moves,
                Step      = _Mapper.Map <ExecutionStepDetail>(story.RootStep)
            };

            return(detail);
        }