public async Task <ManageCaseCommandResult> ManageCase(ManageCaseCommand cmd) { return(cmd.GetType().Name switch { nameof(SaveEvacuationFile) => await HandleSaveEvacuationFile((SaveEvacuationFile)cmd), nameof(DeleteEvacuationFile) => await HandleDeleteEvacuationFile((DeleteEvacuationFile)cmd), nameof(UpdateSecurityPhrase) => await HandleUpdateSecurityPhrase((UpdateSecurityPhrase)cmd), _ => throw new NotSupportedException($"{cmd.GetType().Name} is not supported") });
public async Task <ManageCaseCommandResult> ManageCase(ManageCaseCommand cmd) { return(cmd.GetType().Name switch { nameof(SubmitEvacuationFileNeedsAssessment) => await HandleSubmitEvacuationFileNeedsAssessment((SubmitEvacuationFileNeedsAssessment)cmd), nameof(LinkEvacuationFileRegistrant) => await HandleLinkEvacuationFileRegistrant((LinkEvacuationFileRegistrant)cmd), nameof(SaveEvacuationFileNote) => await HandleSaveEvacuationFileNote((SaveEvacuationFileNote)cmd), nameof(SaveEvacuationFileSupportCommand) => await HandleSaveSupportsToEvacuationFileCommand((SaveEvacuationFileSupportCommand)cmd), nameof(VoidEvacuationFileSupportCommand) => await HandleVoidEvacuationFileSupportCommand((VoidEvacuationFileSupportCommand)cmd), _ => throw new NotSupportedException($"{cmd.GetType().Name} is not supported") });
public async Task <ManageCaseCommandResult> ManageCase(ManageCaseCommand cmd) { return(cmd.GetType().Name switch { nameof(SaveEvacuationFile) => await HandleSaveEvacuationFile((SaveEvacuationFile)cmd), nameof(DeleteEvacuationFile) => await HandleDeleteEvacuationFile((DeleteEvacuationFile)cmd), nameof(SaveEvacuationFileNote) => await HandleSaveEvacuationFileNote((SaveEvacuationFileNote)cmd), nameof(SaveEvacuationFileSupportCommand) => await HandleSaveSupportsToEvacuationFileCommand((SaveEvacuationFileSupportCommand)cmd), nameof(VoidEvacuationFileSupportCommand) => await HandleVoidEvacuationFileSupportCommand((VoidEvacuationFileSupportCommand)cmd), _ => throw new NotSupportedException($"{cmd.GetType().Name} is not supported") });