Ejemplo n.º 1
0
        public async Task <ViewModel> Handle(Request request, CancellationToken cancellationToken)
        {
            _journeyInstance.ThrowIfCompleted();

            var tLevel = await GetTLevel(request.TLevelId);

            return(CreateViewModel(tLevel));
        }
Ejemplo n.º 2
0
        public async Task <ViewModel> Handle(Request request, CancellationToken cancellationToken)
        {
            _journeyInstance.ThrowIfCompleted();

            var apprenticeship = await GetApprenticeship(request.ApprenticeshipId);

            return(CreateViewModel(apprenticeship));
        }
        private void ThrowIfFlowStateNotValid()
        {
            _journeyInstance.ThrowIfCompleted();

            if (!_journeyInstance.State.CompletedStages.HasFlag(AddTLevelJourneyCompletedStages.SelectTLevel))
            {
                throw new InvalidStateException();
            }
        }
 private void ThrowIfFlowStateNotValid()
 {
     _journeyInstance.ThrowIfCompleted();
 }