< Summary

Information
Class: Elsa.Common.Entities.OrderDefinition<T1, T2>
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Entities/OrderDefinition.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 35
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%
.ctor(...)100%11100%
get_Direction()100%11100%
get_KeySelector()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Entities/OrderDefinition.cs

#LineLine coverage
 1using System.Linq.Expressions;
 2
 3namespace Elsa.Common.Entities;
 4
 5/// <summary>
 6/// Represents the order by which to order the results of a query.
 7/// </summary>
 8public class OrderDefinition<T, TProp>
 9{
 10    /// <summary>
 11    /// Creates a new instance of the <see cref="OrderDefinition{T, TProp}"/> class.
 12    /// </summary>
 4013    public OrderDefinition()
 14    {
 4015    }
 16
 17    /// <summary>
 18    /// Creates a new instance of the <see cref="OrderDefinition{T, TProp}"/> class.
 19    /// </summary>
 225820    public OrderDefinition(Expression<Func<T, TProp>> keySelector, OrderDirection direction)
 21    {
 225822        KeySelector = keySelector;
 225823        Direction = direction;
 225824    }
 25
 26    /// <summary>
 27    /// The direction in which to order the results.
 28    /// </summary>
 460929    public OrderDirection Direction { get; set; }
 30
 31    /// <summary>
 32    /// The key selector to use to order the results.
 33    /// </summary>
 460934    public Expression<Func<T, TProp>> KeySelector { get; set; } = null!;
 35}