• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

net-daemon / netdaemon / 17534250533

07 Sep 2025 09:41PM UTC coverage: 83.915% (-0.2%) from 84.091%
17534250533

Pull #1326

github

web-flow
Merge 6bf1a0fff into 25a52e371
Pull Request #1326: Support for Delegate style minimal Apps

858 of 1147 branches covered (74.8%)

Branch coverage included in aggregate %.

45 of 59 new or added lines in 12 files covered. (76.27%)

3 existing lines in 1 file now uncovered.

3352 of 3870 relevant lines covered (86.61%)

911.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Extensions/NetDaemon.Extensions.MqttEntityManager/DependencyInjectionSetup.cs
1
#region
2

3
using Microsoft.Extensions.DependencyInjection;
4
using Microsoft.Extensions.Hosting;
5
using NetDaemon.Extensions.MqttEntityManager.Helpers;
6

7
#endregion
8

9
namespace NetDaemon.Extensions.MqttEntityManager;
10

11
/// <summary>
12
/// DI setup for Mqtt Entity Manager
13
/// </summary>
14
public static class DependencyInjectionSetup
15
{
16
    /// <summary>
17
    /// Add support for managing entities via MQTT
18
    /// </summary>
19
    /// <param name="hostBuilder"></param>
20
    /// <returns></returns>
21
    public static IHostBuilder UseNetDaemonMqttEntityManagement(this IHostBuilder hostBuilder)
22
    {
NEW
23
        return hostBuilder.ConfigureServices((_, services) =>
×
24
        {
×
NEW
25
            services.AddNetDaemonMqttEntityManagement();
×
26
        });
×
27
    }
28

29
    /// <summary>
30
    /// Add support for managing entities via MQTT
31
    /// </summary>
32
    public static IServiceCollection AddNetDaemonMqttEntityManagement(this IServiceCollection services)
33
    {
NEW
34
        services.AddSingleton<IMqttFactory, MqttFactoryFactory>();
×
NEW
35
        services.AddSingleton<IMqttClientOptionsFactory, MqttClientOptionsFactory>();
×
NEW
36
        services.AddSingleton<IMqttFactoryWrapper, MqttFactoryWrapper>();
×
NEW
37
        services.AddSingleton<IMqttEntityManager, MqttEntityManager>();
×
NEW
38
        services.AddSingleton<IAssuredMqttConnection, AssuredMqttConnection>();
×
NEW
39
        services.AddSingleton<IMessageSender, MessageSender>();
×
NEW
40
        services.AddSingleton<IMessageSubscriber, MessageSubscriber>();
×
NEW
41
        services.AddOptions<MqttConfiguration>().BindConfiguration("Mqtt");
×
NEW
42
        return services;
×
43
    }
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc