/// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="sqlDbContext">The context to inject.</param>
 /// <param name="planService">A service to inject.</param>
 /// <param name="customMeterService">A service to inject.</param>
 public CustomMeterDimensionService(ISqlDbContext sqlDbContext, IPlanService planService, ICustomMeterService customMeterService, ILogger <CustomMeterDimensionService> logger)
 {
     _context            = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
     _planService        = planService ?? throw new ArgumentNullException(nameof(planService));
     _customMeterService = customMeterService ?? throw new ArgumentNullException(nameof(customMeterService));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Beispiel #2
0
 /// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="sqlDbContext">The context to inject.</param>
 public SubscriptionCustomMeterUsageService(
     ISqlDbContext sqlDbContext,
     ICustomMeterService customMeterService,
     ISubscriptionService subscriptionService,
     ILogger <SubscriptionCustomMeterUsageService> logger)
 {
     _context             = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
     _customMeterService  = customMeterService ?? throw new ArgumentException(nameof(customMeterService));
     _subscriptionService = subscriptionService ?? throw new ArgumentException(nameof(subscriptionService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Beispiel #3
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);
 }
Beispiel #4
0
 /// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="customMeterService">The service to be injected.</param>
 /// <param name="logger">The logger.</param>
 public CustomMeterController(ICustomMeterService customMeterService, ILogger <CustomMeterController> logger)
 {
     _customMeterService = customMeterService ?? throw new ArgumentNullException(nameof(customMeterService));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }