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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        protected MessageHeader GetCommandHeader(ICommandContainer commandContainer)
        {
            var defaultCommand = commandContainer.ParseCommand <DefaultCommand>();

            return(defaultCommand.Header);
        }