public MainWindow(IGraphService graphService, IHueService hueService, LIFXService lifxService, IYeelightService yeelightService, ICustomApiService customApiService, IOptionsMonitor <ConfigWrapper> optionsAccessor, LIFXOAuthHelper lifxOAuthHelper) { InitializeComponent(); System.Windows.Application.Current.SessionEnding += new SessionEndingCancelEventHandler(Current_SessionEnding); LoadAboutMe(); _graphservice = graphService; _yeelightService = yeelightService; _lifxService = lifxService; _hueService = hueService; _customApiService = customApiService; _options = optionsAccessor.CurrentValue; _lIFXOAuthHelper = lifxOAuthHelper; LoadSettings().ContinueWith( t => { if (t.IsFaulted) { } this.Dispatcher.Invoke(() => { LoadApp(); var tbContext = notificationIcon.DataContext; DataContext = Config; notificationIcon.DataContext = tbContext; }); }); }
public Worker(IHueService hueService, ILogger <Worker> logger, IOptionsMonitor <BaseConfig> optionsAccessor, AppState appState, LIFXService lifxService, ICustomApiService customApiService) { Config = optionsAccessor.CurrentValue; _hueService = hueService; _lifxService = lifxService; _customApiService = customApiService; _logger = logger; _appState = appState; }
public Worker(IHueService hueService, ILogger <Worker> logger, IOptionsMonitor <ConfigWrapper> optionsAccessor, AppState appState, LIFXService lifxService, CustomApiService customApiService, UserAuthService userAuthService) { Config = optionsAccessor.CurrentValue; _hueService = hueService; _lifxService = lifxService; _customApiService = customApiService; _logger = logger; _appState = appState; _userAuthService = userAuthService; _graphClient = new GraphServiceClient(userAuthService); }
public MainWindow(IGraphService graphService, IHueService hueService, LIFXService lifxService, IYeelightService yeelightService, IRemoteHueService remoteHueService, ICustomApiService customApiService, IOptionsMonitor <BaseConfig> optionsAccessor, LIFXOAuthHelper lifxOAuthHelper, DiagnosticsClient diagClient, ILogger <MainWindow> logger, ISettingsService settingsService) { _logger = logger; InitializeComponent(); System.Windows.Application.Current.SessionEnding += new SessionEndingCancelEventHandler(Current_SessionEnding); LoadAboutMe(); _graphservice = graphService; _yeelightService = yeelightService; _lifxService = lifxService; _hueService = hueService; _remoteHueService = remoteHueService; _customApiService = customApiService; _options = optionsAccessor != null ? optionsAccessor.CurrentValue : throw new NullReferenceException("Options Accessor is null"); _lIFXOAuthHelper = lifxOAuthHelper; _diagClient = diagClient; _settingsService = settingsService; LoadSettings().ContinueWith( t => { if (t.IsFaulted) { } this.Dispatcher.Invoke(() => { LoadApp(); var tbContext = notificationIcon.DataContext; DataContext = Config; notificationIcon.DataContext = tbContext; }); }, TaskScheduler.Current); }
public SetColorHandler(ICustomApiService service) { _service = service; }
public InitializeHandler(ICustomApiService service) { _service = service; }