public ParbadLogger(ILogger <TCategoryName> logger, IOptions <ParbadOptions> options) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); if (options == null) { throw new ArgumentNullException(nameof(options)); } _options = options.Value; }
/// <summary> /// Initializes an instance of <see cref="SepehrGateway"/>. /// </summary> public SepehrGateway( IGatewayAccountProvider <SepehrGatewayAccount> accountProvider, IHttpContextAccessor httpContextAccessor, IHttpClientFactory httpClientFactory, IOptions <ParbadOptions> options) : base(accountProvider) { _httpContextAccessor = httpContextAccessor; _httpClient = httpClientFactory.CreateClient(this); _options = options.Value; }
public ZibalGateway( IGatewayAccountProvider <ZibalGatewayAccount> accountProvider, IHttpContextAccessor httpContextAccessor, IHttpClientFactory httpClientFactory, IOptions <ZibalGatewayOptions> gatewayOptions, IOptions <ParbadOptions> options) : base(accountProvider) { _httpContextAccessor = httpContextAccessor; _httpClient = httpClientFactory.CreateClient(Name); _gatewayOptions = gatewayOptions.Value; _options = options.Value; }
/// <summary> /// Initializes an instance of <see cref="DefaultOnlinePayment"/>. /// </summary> public DefaultOnlinePayment( IServiceProvider services, IStorage storage, IPaymentTokenProvider tokenProvider, IGatewayProvider gatewayProvider, IOptions <ParbadOptions> options, IParbadLogger <DefaultOnlinePayment> logger) { Services = services; _storage = storage; _tokenProvider = tokenProvider; _options = options.Value; _logger = logger; _storage = storage; _gatewayProvider = gatewayProvider; }