Example #1
0
 public AccountController(INotifiable notifiable, IOpenAccountUseCase accountUseCase, IGetAccountUseCase getAccountUseCase)
     : base(notifiable)
 {
     _notifiable        = notifiable;
     _accountUseCase    = accountUseCase;
     _getAccountUseCase = getAccountUseCase;
 }
Example #2
0
        public async Task <IActionResult> Post(
            [FromServices] IOpenAccountUseCase useCase,
            [FromForm][Required] decimal amount,
            [FromForm][Required] string currency)
        {
            useCase.SetOutputPort(this);

            await useCase.Execute(amount, currency)
            .ConfigureAwait(false);

            return(this._viewModel !);
        }
#pragma warning disable SCS0016 // Controller method is potentially vulnerable to Cross Site Request Forgery (CSRF).
        public async Task <IActionResult> Post(
#pragma warning restore SCS0016 // Controller method is potentially vulnerable to Cross Site Request Forgery (CSRF).
            [FromServices] IOpenAccountUseCase useCase,
            [FromForm][Required] decimal amount,
            [FromForm][Required] string currency)
        {
            useCase.SetOutputPort(this);

            await useCase.Execute(amount, currency)
            .ConfigureAwait(false);

            return(this._viewModel !);
        }
 public OpenAccountValidationUseCases(IOpenAccountUseCase useCase)
 {
     _useCase = useCase;
 }
 public OpenAccountValidationUseCase(
     IOpenAccountUseCase useCase)
 {
     this._useCase = useCase;
 }
 public OpenAccountValidationUseCase(IOpenAccountUseCase useCase, Notification notification)
 {
     this._useCase      = useCase;
     this._notification = notification;
     this._outputPort   = new OpenAccountPresenter();
 }