Esempio n. 1
0
 /// <summary>
 /// Creates the worker
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="rgbKit">The RGB Kit service</param>
 public Worker(ILogger <Worker> logger, IRGBKitService rgbKit)
 {
     _logger = logger;
     _rgbKit = rgbKit;
     _api    = new RzChromaBroadcastAPI();
     _api.ConnectionChanged += Api_ConnectionChanged;
     _api.ColorChanged      += Api_ColorChanged;
 }
Esempio n. 2
0
 public Worker(ILogger <Worker> logger, IConfiguration configuration, IRGBKitService rgbKit)
 {
     _logger                      = logger;
     _configuration               = configuration;
     _rgbKit                      = rgbKit;
     _performanceMetricsEnabled   = (bool)_configuration.GetValue(typeof(bool), "PerformanceMetricsEnabled");
     _performanceMetricsStopwatch = new Stopwatch();
 }
Esempio n. 3
0
 /// <summary>
 /// Creates the worker
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="configuration">The configuration</param>
 /// <param name="rgbKit">The RGB Kit service</param>
 public Worker(ILogger <Worker> logger, IConfiguration configuration, IRGBKitService rgbKit)
 {
     _logger                      = logger;
     _configuration               = configuration;
     _rgbKit                      = rgbKit;
     _api                         = new RzChromaBroadcastAPI();
     _api.ConnectionChanged      += Api_ConnectionChanged;
     _api.ColorChanged           += Api_ColorChanged;
     _performanceMetricsEnabled   = (bool)_configuration.GetValue(typeof(bool), "PerformanceMetricsEnabled");
     _performanceMetricsStopwatch = new Stopwatch();
 }
 /// <summary>
 /// Uses the CUE device provider
 /// </summary>
 /// <param name="lightSync">The RGB Kit instance to add the provider to</param>
 public static void UseCue(this IRGBKitService rgbKit)
 {
     rgbKit.AddProvider(new CueDeviceProvider());
 }
Esempio n. 5
0
 /// <summary>
 /// Uses the NZXT device provider
 /// </summary>
 /// <param name="rgbKit">The RGB Kit instance to add the provider to</param>
 public static void UseNZXT(this IRGBKitService rgbKit)
 {
     rgbKit.AddProvider(new NZXTDeviceProvider());
 }
 /// <summary>
 /// Uses the Aura device provider
 /// </summary>
 /// <param name="rgbKit">The RGB Kit instance to add the provider to</param>
 public static void UseAura(this IRGBKitService rgbKit)
 {
     rgbKit.AddProvider(new AuraDeviceProvider());
 }