public AccountsController( IDepositUseCase depositUseCase, Presenter presenter) { _depositUseCase = depositUseCase; _presenter = presenter; }
public TransactionController(INotifiable notifiable, IWithdrawalUseCase withdrawalUseCase, IDepositUseCase depositUseCase, IPayUseCase payUseCase, IGetBankStatementUseCase getBankStatementUseCase) : base(notifiable) { _withdrawalUseCase = withdrawalUseCase; _depositUseCase = depositUseCase; _payUseCase = payUseCase; _getBankStatementUseCase = getBankStatementUseCase; }
public async Task <IActionResult> Deposit( [FromServices] IDepositUseCase useCase, [FromRoute][Required] Guid accountId, [FromForm][Required] decimal amount, [FromForm][Required] string currency) { useCase.SetOutputPort(this); await useCase.Execute(accountId, 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> Deposit( #pragma warning restore SCS0016 // Controller method is potentially vulnerable to Cross Site Request Forgery (CSRF). [FromServices] IDepositUseCase useCase, [FromRoute][Required] Guid accountId, [FromForm][Required] decimal amount, [FromForm][Required] string currency) { useCase.SetOutputPort(this); await useCase.Execute(accountId, amount, currency) .ConfigureAwait(false); return(this._viewModel !); }
/// <summary> /// Initializes a new instance of the <see cref="DepositValidationUseCase" /> class. /// </summary> /// <param name="useCase"></param> public DepositValidationUseCase(IDepositUseCase useCase) { this._useCase = useCase; }
public AccountsController( IDepositUseCase depositService) { this.depositService = depositService; }
/// <summary> /// Initializes a new instance of the <see cref="DepositValidationUseCase" /> class. /// </summary> /// <param name="useCase"></param> /// <param name="notification"></param> public DepositValidationUseCase(IDepositUseCase useCase, Notification notification) { this._useCase = useCase; this._notification = notification; this._outputPort = new DepositPresenter(); }