< Summary

Information
Class: MoreStructures.XifoStructures.XStack<T>
Assembly: MoreStructures
File(s): /home/runner/work/MoreStructures/MoreStructures/MoreStructures/XifoStructures/XStack.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 29
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 Cyclomatic complexity Line coverage
.ctor()100%1100%
Pop()100%1100%
Push(...)100%1100%
get_Count()100%1100%

File(s)

/home/runner/work/MoreStructures/MoreStructures/MoreStructures/XifoStructures/XStack.cs

#LineLine coverage
 1namespace MoreStructures.XifoStructures;
 2
 3/// <summary>
 4/// A <see cref="IXifoStructure{T}"/> based on a <see cref="Stack{T}"/>.
 5/// </summary>
 6/// <typeparam name="T">
 7/// The type of items of the data structure, and of the underlying <see cref="Stack{T}"/>.
 8/// </typeparam>
 9public class XStack<T> : IXifoStructure<T>
 10{
 39711    private readonly Stack<T> Underlying = new();
 12
 13    /// <summary>
 14    /// Invokes <see cref="Stack{T}.Pop"/> on the underlying <see cref="Stack{T}"/>.
 15    /// </summary>
 16    /// <returns>An item of type <typeparamref name="T"/>.</returns>
 262517    public T Pop() => Underlying.Pop();
 18
 19    /// <summary>
 20    /// Invokes <see cref="Stack{T}.Push(T)"/> on the underlying <see cref="Stack{T}"/>.
 21    /// </summary>
 22    /// <param name="item">An item of type <typeparamref name="T"/>.</param>
 264923    public void Push(T item) => Underlying.Push(item);
 24
 25    /// <summary>
 26    /// Invokes <see cref="Stack{T}.Count"/> on the underlying <see cref="Stack{T}"/>.
 27    /// </summary>
 308228    public int Count => Underlying.Count;
 29}

Methods/Properties

.ctor()
Pop()
Push(T)
get_Count()