public async Task ProcessAsync(ICommandContainer commandContainer) { var validateCommand = commandContainer.ParseCommand <CancelTransferCommand>(); var header = validateCommand.Header; var content = validateCommand.Content; try { await CancelTransferAsync(header, content); } catch (Exception exception) { await ProcessCancellationFailureAsync(header, exception); } }
public async Task ProcessAsync(ICommandContainer commandContainer) { var validateCommand = commandContainer.ParseCommand <IssueReceiptCommand>(); var header = validateCommand.Header; var content = validateCommand.Content; try { await CreateReceiptAsync(header, content); } catch (Exception exception) { await ProcessFailure(header, exception); } }
protected MessageHeader GetCommandHeader(ICommandContainer commandContainer) { var defaultCommand = commandContainer.ParseCommand <DefaultCommand>(); return(defaultCommand.Header); }