Exemplo n.º 1
0
 /// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="sqlDbContext">The context to inject.</param>
 /// <param name="offerService">The service to inject.</param>
 /// <param name="logger">The logger.</param>
 public WebhookService(
     ISqlDbContext sqlDbContext,
     IOfferService offerService,
     IWebhookParameterService webhookParameterService,
     IWebhookWebhookParameterService webhookWebhookParameterService,
     ILogger <WebhookService> logger)
 {
     _context                        = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
     _offerService                   = offerService ?? throw new ArgumentNullException(nameof(offerService));
     _webhookParameterService        = webhookParameterService ?? throw new ArgumentNullException(nameof(webhookParameterService));
     _webhookWebhookParameterService = webhookWebhookParameterService ?? throw new ArgumentNullException(nameof(webhookWebhookParameterService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 2
0
        public ProvisioningService(ISqlDbContext sqlDbContext, IProvisioningClient provisioningClient,
                                   IFulfillmentClient fulfillmentclient, IIpAddressService ipAddressService,
                                   ISubscriptionParameterService subscriptionParameterService, IArmTemplateParameterService armTemplateParameterService,
                                   IWebhookParameterService webhookParameterService, IStorageUtility storageUtility, ILogger <ProvisioningService> logger)
        {
            _context                      = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
            _provisioningClient           = provisioningClient ?? throw new ArgumentNullException(nameof(provisioningClient));
            _fulfillmentClient            = fulfillmentclient ?? throw new ArgumentNullException(nameof(fulfillmentclient));
            _ipAddressService             = ipAddressService ?? throw new ArgumentNullException(nameof(ipAddressService));
            _subscriptionParameterService = subscriptionParameterService ?? throw new ArgumentNullException(nameof(subscriptionParameterService));
            _armTemplateParameterService  = armTemplateParameterService ?? throw new ArgumentNullException(nameof(armTemplateParameterService));
            _webhookParameterService      = webhookParameterService ?? throw new ArgumentNullException(nameof(webhookParameterService));
            _storageUtility               = storageUtility ?? throw new ArgumentNullException(nameof(storageUtility));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            //TODO: add the app settings.
            _maxRetry = 3;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="webhookParameterService">The service to inject.</param>
 /// <param name="logger">The logger.</param>
 public WebhookParameterController(IWebhookParameterService webhookParameterService, ILogger <WebhookParameterController> logger)
 {
     _webhookParameterService = webhookParameterService ?? throw new ArgumentNullException(nameof(webhookParameterService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }