public async Task <ViewModel> Handle(Request request, CancellationToken cancellationToken) { _journeyInstance.ThrowIfCompleted(); var tLevel = await GetTLevel(request.TLevelId); return(CreateViewModel(tLevel)); }
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(); }