예제 #1
0
 public TransactionService(
     ITransactionClient transactionClient,
     IOptions <AuthorizeNetOptions> options,
     ILogger <TransactionService> logger)
 {
     _transactionClient = transactionClient ?? throw new ArgumentNullException(nameof(transactionClient));
     _options           = options.Value;
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
 }
예제 #2
0
    public CustomerService(
        IOptions <AuthorizeNetOptions> options,
        ICustomerProfileClient customerProfileClient,
        ICustomerPaymentProfileClient customerPaymentProfileClient,
        SampleData sampleData,
        ILogger <CustomerService> logger)
    {
        if (options is null)
        {
            throw new ArgumentNullException(nameof(options));
        }

        _options = options.Value;
        _customerProfileClient        = customerProfileClient ?? throw new ArgumentNullException(nameof(customerProfileClient));
        _customerPaymentProfileClient = customerPaymentProfileClient ?? throw new ArgumentNullException(nameof(customerPaymentProfileClient));
        _sampleData = sampleData;
        _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
    }