Beispiel #1
0
 public DeviceConfigSwitchesService(
     IEnumerable <IRequestValidator <IServiceRequest> > requestInvalidateValidators,
     IEnumerable <IRequestValidator <DeviceConfigRequestBase> > commonDeviceLevelValidators,
     ISwitchesValidator switchesValidator,
     IInjectConfig injectConfig,
     IDeviceConfigRepository deviceConfigRepository,
     IParameterAttributeCache parameterAttributeCache,
     IMessageConstructor messageConstructor,
     IAckBypasser ackBypasser, IDeviceConfigSettingConfig settingsConfig,
     IAssetDeviceRepository assetDeviceRepository,
     IOptions <Configurations> configurations,
     IMapper mapper, ILoggingService loggingService, ITransactions transactions) :
     base(injectConfig, deviceConfigRepository, parameterAttributeCache, mapper, loggingService, requestInvalidateValidators, commonDeviceLevelValidators,
          assetDeviceRepository, messageConstructor, ackBypasser, configurations, settingsConfig, transactions)
 {
     _attributeToRequestMaps           = injectConfig.ResolveKeyed <DeviceConfigAttributeToRequestMaps>("DeviceConfigAttributeToRequestMaps");
     _requestToAttributeMaps           = injectConfig.ResolveKeyed <DeviceConfigRequestToAttributeMaps>("DeviceConfigRequestToAttributeMaps");
     _switchesValidtor                 = switchesValidator;
     _sendAllSwitchesDeviceFamilyLists = configurations.Value.AppSettings.DeviceConfigSendAllSwitchesDeviceFamilyLists.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
 }
Beispiel #2
0
 protected DeviceConfigRepositoryServiceBase(IInjectConfig injectInfo, IDeviceConfigRepository deviceConfigRepository, IParameterAttributeCache parameterAttributeCache, IMapper mapper,
                                             IAssetDeviceRepository assetDeviceRepository,
                                             IMessageConstructor messageConstructor,
                                             IAckBypasser ackBypasser,
                                             IDeviceConfigSettingConfig settingsConfig,
                                             IOptions <Configurations> configurations,
                                             ITransactions transactions,
                                             ILoggingService loggingService) : base(parameterAttributeCache, mapper, loggingService)
 {
     this._attributeMaps          = injectInfo.ResolveKeyed <DeviceConfigAttributeToRequestMaps>("DeviceConfigAttributeToRequestMaps");
     this._deviceConfigRepository = deviceConfigRepository;
     this._loggingService.CreateLogger(this.GetType());
     this._messageConstructor        = messageConstructor;
     this._ackBypasser               = ackBypasser;
     this._settingsConfig            = settingsConfig;
     this._assetDeviceRepository     = assetDeviceRepository;
     this._deviceService             = new MessageConstructorDeviceService(configurations);
     this._deviceTypeFamilyContainer = _deviceService.GetDeviceTypeFamily();
     this._configurations            = configurations;
     //this._assetDeviceConfigApiUrl = ConfigurationManager.AppSettings["PendingDeviceConfigApiUri"];
     this._pendingClearOffDeviceTypes = _configurations.Value.AppSettings.ClearOffPendingValueForDeviceTypes.Split(',').ToList();
     this._pendingClearOffDays        = _configurations.Value.AppSettings.ClearOffPendingValueGreaterThanNoOfDays;
     this._transactions = transactions;
 }
Beispiel #3
0
 public SwitchesValidator(ILoggingService loggingService, IParameterAttributeCache attributeCache, IInjectConfig injectConfig) : base(loggingService)
 {
     _attrCache         = attributeCache;
     this._injectConfig = injectConfig;
     _attributeMaps     = injectConfig.ResolveKeyed <DeviceConfigRequestToAttributeMaps>("DeviceConfigRequestToAttributeMaps");
 }
Beispiel #4
0
 public DeviceConfigApiControllerBase(ConfigNameValueCollection attributeMaps, ILogger loggingService)
 {
     this._loggingService = loggingService;
     this._attributeMaps  = attributeMaps;
 }