< Summary

Information
Class: MyNet.Observable.Collections.Grouping.ExpressionGroupingProperty<T>
Assembly: MyNet.Observable
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Collections/Grouping/ExpressionGroupingProperty.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
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%
ProvideExpression()100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Observable/Collections/Grouping/ExpressionGroupingProperty.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ExpressionGroupingProperty.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8using System.Linq.Expressions;
 9
 10namespace MyNet.Observable.Collections.Grouping;
 11
 12/// <summary>
 13/// Represents a grouping property defined by an expression for items of type T. This class implements the <see cref="IG
 14/// </summary>
 15/// <param name="expression">The expression that defines the grouping property.</param>
 16/// <typeparam name="T">The type of the items to be grouped.</typeparam>
 17public sealed class ExpressionGroupingProperty<T>(Expression<Func<T, object?>> expression) : IGroupingProperty<T>
 18{
 19    /// <summary>
 20    /// Gets the expression that defines the grouping property. This expression is used to determine the value of the pr
 21    /// </summary>
 2722    public Expression<Func<T, object?>> Expression { get; } = expression;
 23
 24    /// <summary>
 25    /// Provides the expression that defines the grouping property. This method is part of the <see cref="IGroupingPrope
 26    /// </summary>
 27    /// <returns>The expression that defines the grouping property.</returns>
 1528    public Expression<Func<T, object?>> ProvideExpression() => Expression;
 29}
 30