Ejemplo n.º 1
0
        public async Task <IActionResult> GetTaxaJuros(
            [FromServices] IMediator mediator,
            [FromServices] GetTaxaJurosPresenter presenter)
        {
            var input = new GetTaxaJurosInput();
            await mediator.PublishAsync(input)
            .ConfigureAwait(false);

            return(presenter.ViewModel);
        }
Ejemplo n.º 2
0
        public async Task Execute(GetTaxaJurosInput input)
        {
            if (input is null)
            {
                this._outputPort.WriteError(Messages.InputIsNull);
                return;
            }

            // Aqui busca dados na camada de Infrastructure.
            // No entanto foi solicitado para retornar o valor fixo de 0.01 de Juros.

            Juro juro = new Juro(JURO);

            this.BuildOutput(juro);
        }