< Summary

Information
Class: Elsa.Mediator.Abstractions.ChannelBase<T>
Assembly: Elsa.Mediator
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Abstractions/ChannelBase.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 30
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%
get_Writer()100%11100%
get_Reader()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/Abstractions/ChannelBase.cs

#LineLine coverage
 1using System.Threading.Channels;
 2
 3namespace Elsa.Mediator.Abstractions;
 4
 5/// <summary>
 6/// A base class for channels.
 7/// </summary>
 8/// <typeparam name="T">The type of the items in the channel.</typeparam>
 9public abstract class ChannelBase<T>
 10{
 11    private readonly Channel<T> _channel;
 12
 13    /// <summary>
 14    /// Initializes a new instance of the <see cref="ChannelBase{T}"/> class.
 15    /// </summary>
 316    protected ChannelBase()
 17    {
 318        _channel = Channel.CreateUnbounded<T>();
 319    }
 20
 21    /// <summary>
 22    /// Gets the writer for the channel.
 23    /// </summary>
 2224    public ChannelWriter<T> Writer => _channel.Writer;
 25
 26    /// <summary>
 27    /// Gets the reader for the channel.
 28    /// </summary>
 629    public ChannelReader<T> Reader => _channel.Reader;
 30}

Methods/Properties

.ctor()
get_Writer()
get_Reader()