using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using MQTTnet.Core.Adapter; using MQTTnet.Core.Server; namespace MQTTnet.AspNetCore { public class MqttHostedServer : MqttServer, IHostedService { public MqttHostedServer(IOptions options, IEnumerable adapters, ILogger logger, MqttClientSessionsManager clientSessionsManager) : base(options, adapters, logger, clientSessionsManager) { } public Task StartAsync(CancellationToken cancellationToken) { return StartAsync(); } public Task StopAsync(CancellationToken cancellationToken) { return StopAsync(); } } }