Exemplo 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;
 }
Exemplo 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();
 }
Exemplo 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());
 }
Exemplo 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());
 }