예제 #1
0
 /// <summary>
 /// Constructor that uses dependency injection.
 /// </summary>
 /// <param name="sqlDbContext">The context to inject.</param>
 /// <param name="offerService">A service to inject.</param>
 /// <param name="planService">A service to inject.</param>
 /// <param name="customMeterDimensionService">A service to inject.</param>
 /// <param name="customMeterService">A service to inject.</param>
 /// <param name="offerParameterService">A service to inject.</param>
 /// <param name="logger">The logger.</param>
 public SubscriptionService(ISqlDbContext sqlDbContext,
                            IOfferService offerService,
                            IPlanService planService,
                            IOfferParameterService offerParameterService,
                            ICustomMeterDimensionService customMeterDimensionService,
                            ICustomMeterService customMeterService,
                            ILogger <SubscriptionService> logger)
 {
     _context      = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
     _offerService = offerService ?? throw new ArgumentNullException(nameof(offerService));
     _planService  = planService ?? throw new ArgumentNullException(nameof(planService));
     _customMeterDimensionService = customMeterDimensionService ?? throw new ArgumentNullException(nameof(customMeterDimensionService));
     _customMeterService          = customMeterService ?? throw new ArgumentNullException(nameof(customMeterService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _offerParameterService = offerParameterService ?? throw new ArgumentNullException(nameof(offerParameterService));
 }
예제 #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);
 }
예제 #3
0
        /// <summary>
        /// Constructor that uses dependency injection.
        /// </summary>
        /// <param name="customMeterDimensionService">The service to inject.</param>
        /// <param name="logger">The logger.</param>
        public CustomMeterDimensionController(ICustomMeterDimensionService customMeterDimensionService, ILogger <CustomMeterDimensionController> logger)
        {
            _customMeterDimensionService = customMeterDimensionService ?? throw new ArgumentNullException(nameof(customMeterDimensionService));

            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }