< Summary

Information
Class: TeleFlow.Framework.Hosting.TeleFlowHostedService
Assembly: TeleFlow.Framework.Hosting
File(s): /_/src/TeleFlow.Framework.Hosting/TeleFlowHostedService.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 22
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
ExecuteAsync()100%11100%

File(s)

/_/src/TeleFlow.Framework.Hosting/TeleFlowHostedService.cs

#LineLine coverage
 1using Microsoft.Extensions.Hosting;
 2using TeleFlow.Framework.Application;
 3
 4namespace TeleFlow.Framework.Hosting;
 5
 6/// <summary>
 7/// Bridges the Generic Host background-service lifecycle to a configured TeleFlow application without taking ownership
 8/// of the host service provider. StartAsync enters the TeleFlow update source, and StopAsync cancels it through the hos
 9/// </summary>
 610internal sealed class TeleFlowHostedService(
 611    IServiceProvider services,
 612    TeleFlowHostedServiceCollectionState serviceCollectionState) : BackgroundService
 13{
 14    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
 15    {
 416        await using var application = TeleFlowApplicationRuntimeFactory.CreateBorrowed(
 417            services,
 418            serviceCollectionState.Services);
 19
 320        await application.RunAsync(stoppingToken).ConfigureAwait(false);
 221    }
 22}