< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Hosting.NoopHostLifetime
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/NoopHostLifetime.cs
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 21
Line coverage: 0%
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

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
WaitForStartAsync(...)100%210%
StopAsync(...)100%210%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/NoopHostLifetime.cs

#LineLine coverage
 1namespace Kestrun.Hosting;
 2
 3/// <summary>
 4/// Minimal <see cref="IHostLifetime"/> that performs no blocking operations.
 5/// Useful for scenarios like testing where the host lifecycle is externally managed.
 6/// </summary>
 7public class NoopHostLifetime : IHostLifetime
 8{
 9    /// <summary>
 10    /// Waits for the host to start. This implementation does nothing and completes immediately.
 11    /// </summary>
 12    /// <param name="cancellationToken">A token to signal cancellation.</param>
 13    /// <returns>A completed task.</returns>
 014    public Task WaitForStartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
 15    /// <summary>
 16    /// Stops the host. This implementation does nothing and completes immediately.
 17    /// </summary>
 18    /// <param name="cancellationToken">A token to signal cancellation.</param>
 19    /// <returns>A completed task.</returns>
 020    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
 21}