< Summary

Information
Class: MyNet.Primitives.Providers.ItemsProvider<T>
Assembly: MyNet.Primitives
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Primitives/Providers/ItemsProvider.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 25
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
.ctor(...)100%11100%
GetItems()100%22100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Primitives/Providers/ItemsProvider.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ItemsProvider.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8using System.Collections.Generic;
 9
 10namespace MyNet.Primitives.Providers;
 11
 12/// <summary>
 13/// A simple implementation of the <see cref="IItemsProvider{T}"/> interface that takes an <see cref="IEnumerable{T}"/> 
 14/// </summary>
 15/// <param name="items">The collection of items to be provided.</param>
 16/// <typeparam name="T">The type of items provided by the implementing class.</typeparam>
 1217public class ItemsProvider<T>(IEnumerable<T> items) : ItemsProviderBase<T>
 18{
 19    /// <summary>
 20    /// Provides the collection of items that was passed to the constructor. This method simply returns the original col
 21    /// </summary>
 22    /// <returns>The collection of items provided by this instance.</returns>
 1223    public override IEnumerable<T> GetItems() => items ?? throw new ArgumentNullException(nameof(items));
 24}
 25