Пример #1
0
        public CustomApiService(IOptionsMonitor <BaseConfig> optionsAccessor, ILogger <CustomApiService> logger, MediatR.IMediator mediator)
        {
            _logger   = logger;
            _options  = optionsAccessor.CurrentValue;
            _mediator = mediator;

            _client = new HttpClient
            {
                Timeout = TimeSpan.FromSeconds(optionsAccessor.CurrentValue.LightSettings.CustomApi.CustomApiTimeout > 0 ?
                                               optionsAccessor.CurrentValue.LightSettings.CustomApi.CustomApiTimeout :
                                               20)
            };
        }
Пример #2
0
 public WizService(BaseConfig options)
 {
     _options = options;
 }
Пример #3
0
 public WizService(IOptionsMonitor <BaseConfig> optionsAccessor, MediatR.IMediator mediator, ILogger <WizService> logger)
 {
     _mediator = mediator;
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
 }
Пример #4
0
 public LIFXService(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }
Пример #5
0
 public void Initialize(BaseConfig options)
 {
     _options = options;
 }
Пример #6
0
 public LIFXService(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor, MediatR.IMediator mediator, ILogger <LIFXService> logger)
 {
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
     _mediator = mediator;
 }
Пример #7
0
 public YeelightService(BaseConfig options)
 {
     _options = options;
 }
Пример #8
0
 public void SetConfig(BaseConfig config)
 {
     Config = config;
 }
Пример #9
0
 public YeelightService(IOptionsMonitor <BaseConfig> optionsAccessor, ILogger <YeelightService> logger, MediatR.IMediator mediator)
 {
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
     _mediator = mediator;
 }
Пример #10
0
 public YeelightService(IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }
Пример #11
0
 public static BaseConfig CleanColors(BaseConfig config)
 {
     ReadPropertiesRecursive(config);
     return(config);
 }
Пример #12
0
 public HueService(BaseConfig options)
 {
     _options = options;
 }
 public LIFXOAuthHelper(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor, ILogger <LIFXOAuthHelper> logger)
 {
     _logger  = logger;
     _options = optionsAccessor.CurrentValue;
 }
Пример #14
0
 public CustomApiService(BaseConfig options)
 {
     _options = options;
 }
Пример #15
0
 public CustomApiService(IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }