< Summary

Information
Class: TeleFlow.Framework.Application.TeleFlowShutdownTaskRegistration
Assembly: TeleFlow.Framework.Core
File(s): /_/src/TeleFlow.Framework.Core/Application/TeleFlowShutdownTaskRegistration.cs
Line coverage
50%
Covered lines: 3
Uncovered lines: 3
Coverable lines: 6
Total lines: 25
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 1
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)0%1150%

File(s)

/_/src/TeleFlow.Framework.Core/Application/TeleFlowShutdownTaskRegistration.cs

#LineLine coverage
 1namespace TeleFlow.Framework.Application;
 2
 3/// <summary>
 4/// Stores a shutdown task type registered through TeleFlow lifecycle registration APIs.
 5/// The application lifecycle runner consumes these descriptors in reverse registration order
 6/// after the update source has stopped.
 7/// </summary>
 8internal sealed class TeleFlowShutdownTaskRegistration
 9{
 10    public TeleFlowShutdownTaskRegistration(Type taskType)
 11    {
 812        ArgumentNullException.ThrowIfNull(taskType);
 13
 814        if (!typeof(ITeleFlowShutdownTask).IsAssignableFrom(taskType))
 15        {
 016            throw new ArgumentException(
 017                $"Type '{taskType.FullName}' must implement {nameof(ITeleFlowShutdownTask)}.",
 018                nameof(taskType));
 19        }
 20
 21        TaskType = taskType;
 822    }
 23
 24    public Type TaskType { get; }
 25}

Methods/Properties

.ctor(System.Type)