public TelegramBotService( ILogger <TelegramBotService> logger, ISensorTempReader sensorTempReader, IPhysSensorInfo physSensorInfo, IWeatherForecastService weatherForecastService, IServiceScopeFactory scopeFactory, IOptions <TelegramBotSettings> options) { this.logger = logger; this.sensorTempReader = sensorTempReader; this.physSensorInfo = physSensorInfo; this.weatherForecastService = weatherForecastService; this.scopeFactory = scopeFactory; telegramBotSettings = options.Value; token = telegramBotSettings.TelegramBotAPIKey; LoadTrustedUsersFromDB(); trustedUsers.CollectionChanged += TrustedUsers_CollectionChanged; botClient = new TelegramBotClient(token) { Timeout = TimeSpan.FromSeconds(10) }; botClient.OnMessage += BotClient_OnMessage; botClient.OnCallbackQuery += BotClient_OnCallbackQuery; }
public SensorTempCommand(ISensorTempReader sensorTempReader, IPhysSensorInfo physSensorInfo) { this.physSensorInfo = physSensorInfo; callback = new SensorTempCommandInlineCallback(sensorTempReader); }
public ConnectedSensorsController(IPhysSensorInfo sensorInfo) { this.sensorInfo = sensorInfo; }