< Summary

Information
Class: CounterpointCollective.Dataflow.Internal.ITargetBlockImplementationExtensions
Assembly: Dataflow.Composable
File(s): /builds/counterpointcollective/composabledataflowblocks/Source/Dataflow.Composable/DataFlow/Internal/ITargetBlockImplementationExtensions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 19
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
PostAsserted(...)100%22100%

File(s)

/builds/counterpointcollective/composabledataflowblocks/Source/Dataflow.Composable/DataFlow/Internal/ITargetBlockImplementationExtensions.cs

#LineLine coverage
 1
 2using System;
 3using System.Diagnostics.CodeAnalysis;
 4using System.Threading.Tasks.Dataflow;
 5
 6namespace CounterpointCollective.Dataflow.Internal;
 7
 8/// <exclude />
 9public static class ITargetBlockImplementationExtensions
 10{
 11
 12    public static void PostAsserted<T>(this ITargetBlock<T> target, T messageValue)
 13    {
 112892314        if (!target.Post(messageValue))
 15        {
 116            throw new InvalidOperationException("Target did not accept the message");
 17        }
 112892218    }
 19}