public ProvisioningService(ISqlDbContext sqlDbContext, IProvisioningClient provisioningClient,
                                   IFulfillmentClient fulfillmentclient, IIpAddressService ipAddressService,
                                   ISubscriptionParameterService subscriptionParameterService, IArmTemplateParameterService armTemplateParameterService,
                                   IWebhookParameterService webhookParameterService, ISubscriptionCustomMeterUsageService subscriptionCustomMeterUsageService,
                                   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));
            _subscriptionCustomMeterUsageService = subscriptionCustomMeterUsageService ?? throw new ArgumentNullException(nameof(subscriptionCustomMeterUsageService));
            _storageUtility                      = storageUtility ?? throw new ArgumentNullException(nameof(storageUtility));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            //TODO: add the app settings.
            _maxRetry = 3;
        }
Example #2
0
 public CustomMeterEventService(
     IOptionsMonitor <SecuredProvisioningClientConfiguration> optionsMonitor,
     ILogger <CustomMeterEventService> logger,
     ICustomMeterService customMeterService,
     IKeyVaultHelper keyVaultHelper,
     ICustomMeteringClient customMeteringClient,
     ISubscriptionService subscriptionService,
     ISubscriptionCustomMeterUsageService subscriptionCustomMeterUsageService,
     ICustomMeterDimensionService customMeterDimensionService,
     ITelemetryDataConnectorService telemetryDataConnectorService,
     IOfferService offerService,
     IStorageUtility storageUtility)
 {
     _logger               = logger;
     _customMeterService   = customMeterService;
     _customMeteringClient = customMeteringClient;
     _subscriptionService  = subscriptionService;
     _subscriptionCustomMeterUsageService = subscriptionCustomMeterUsageService;
     _customMeterDimensionService         = customMeterDimensionService;
     _offerService = offerService;
     _telemetryDataConnectorService = telemetryDataConnectorService;
     _storageUtility             = storageUtility;
     _telemetryConnectionManager = new TelemetryDataConnectorManager(new HttpClient(), logger, keyVaultHelper);
 }