/// <summary> /// Initializes an instance of the <see cref="NetatmoHub"/> class. /// </summary> /// <param name="netatmo">The Netatmo instance.</param> /// <param name="logger">The application logger.</param> /// <param name="options">The application options.</param> public NetatmoHub(INetatmo netatmo, ILogger <NetatmoHub> logger, IOptions <AppSettings> options) : base(logger, options) { _netatmo = netatmo; }
/// <summary> /// Initializes a new instance of the <see cref="HealthCheck"/> class. /// </summary> /// <param name="netatmo">The INetatmo instance.</param> /// <param name="options">The application options.</param> /// <param name="logger">The application logger.</param> public HealthCheck(INetatmo netatmo, IOptions <AppSettings> options, ILogger <HealthCheck> logger) : base(logger, options) { _netatmo = netatmo; }
/// <summary> /// Initializes a new instance of the <see cref="NetatmoController"/> class. /// </summary> /// <param name="netatmo">The Netatmo instance.</param> /// <param name="options">The application options.</param> /// <param name="logger">The application logger.</param> public NetatmoController(INetatmo netatmo, IOptions <AppSettings> options, ILogger <NetatmoController> logger) : base(logger, options) { _netatmo = netatmo; }
/// <summary> /// Initializes an instance of the <see cref="NetatmoMonitor"/> class. /// </summary> /// <param name="netatmo">The Netatmo instance.</param> /// <param name="hub">The test data SignalR hub.</param> /// <param name="logger">The application logger.</param> /// <param name="options">The application options.</param> /// <param name="environment"></param> public NetatmoMonitor(INetatmo netatmo, IHubContext <NetatmoHub> hub, ILogger <NetatmoMonitor> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _netatmo = netatmo; _hub = hub; }
/// <summary> /// Initializes a new instance of the <see cref="ReadCommand"/> class. /// </summary> /// <param name="netatmo">The Netatmo instance.</param> /// <param name="logger">The logger instance.</param> /// <param name="options">The setting options instance.</param> /// <param name="environment">The hosting environment instance.</param> public ReadCommand(INetatmo netatmo, ILogger <ReadCommand> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _logger?.LogDebug("ReadCommand()"); // Setting the Netatmo instance. _netatmo = netatmo; }
/// <summary> /// Initializes a new instance of the <see cref="TestRead"/> class. /// </summary> /// <param name="outputHelper"></param> public TestRead(NetatmoFixture fixture, ITestOutputHelper outputHelper) { // Set the default culture. CultureInfo.CurrentCulture = new CultureInfo("en-US"); var loggerFactory = new LoggerFactory(); loggerFactory.AddProvider(new XunitLoggerProvider(outputHelper)); _logger = loggerFactory.CreateLogger <Netatmo>(); _netatmo = fixture.Netatmo; }
/// <summary> /// Initializes a new instance of the <see cref="RootCommand"/> class. /// The RootCommand sets default values for some properties using the application settings. /// </summary> /// <param name="netatmo">The Netatmo instance.</param> /// <param name="logger">The logger instance.</param> /// <param name="options">The setting options instance.</param> /// <param name="environment">The hosting environment instance.</param> public RootCommand(INetatmo netatmo, ILogger <RootCommand> logger, IOptions <AppSettings> options, IHostingEnvironment environment) : base(logger, options, environment) { _logger?.LogDebug("RootCommand()"); // Setting default options from appsettings.json file. BaseAddress = _settings.BaseAddress; Timeout = _settings.Timeout; User = _settings.User; Password = _settings.Password; ClientID = _settings.ClientID; ClientSecret = _settings.ClientSecret; // Setting the Netatmo instance. _netatmo = netatmo; }