Exemple #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)
            };
        }
Exemple #2
0
 public WizService(BaseConfig options)
 {
     _options = options;
 }
Exemple #3
0
 public WizService(IOptionsMonitor <BaseConfig> optionsAccessor, MediatR.IMediator mediator, ILogger <WizService> logger)
 {
     _mediator = mediator;
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
 }
 public LIFXService(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }
 public void Initialize(BaseConfig options)
 {
     _options = options;
 }
 public LIFXService(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor, MediatR.IMediator mediator, ILogger <LIFXService> logger)
 {
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
     _mediator = mediator;
 }
 public YeelightService(BaseConfig options)
 {
     _options = options;
 }
Exemple #8
0
 public void SetConfig(BaseConfig config)
 {
     Config = config;
 }
Exemple #9
0
 public YeelightService(IOptionsMonitor <BaseConfig> optionsAccessor, ILogger <YeelightService> logger, MediatR.IMediator mediator)
 {
     _logger   = logger;
     _options  = optionsAccessor.CurrentValue;
     _mediator = mediator;
 }
 public YeelightService(IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }
Exemple #11
0
 public static BaseConfig CleanColors(BaseConfig config)
 {
     ReadPropertiesRecursive(config);
     return(config);
 }
Exemple #12
0
 public HueService(BaseConfig options)
 {
     _options = options;
 }
 public LIFXOAuthHelper(Microsoft.Extensions.Options.IOptionsMonitor <BaseConfig> optionsAccessor, ILogger <LIFXOAuthHelper> logger)
 {
     _logger  = logger;
     _options = optionsAccessor.CurrentValue;
 }
 public CustomApiService(BaseConfig options)
 {
     _options = options;
 }
 public CustomApiService(IOptionsMonitor <BaseConfig> optionsAccessor)
 {
     _options = optionsAccessor.CurrentValue;
 }