< Summary

Information
Class: MyNet.Globalization.Inflection.InflectionRules
Assembly: MyNet.Globalization
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Globalization/Inflection/InflectionRules.cs
Tag: 323_28699572109
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 41
Line coverage: 0%
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
.cctor()100%210%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Globalization/Inflection/InflectionRules.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="InflectionRules.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System.Collections.Immutable;
 8
 9namespace MyNet.Globalization.Inflection;
 10
 11/// <summary>
 12/// Represents a collection of inflection rules, including pluralization rules, singularization rules, and uncountable w
 13/// </summary>
 14public sealed class InflectionRules
 15{
 16    /// <summary>
 17    /// Gets an empty instance of <see cref="InflectionRules"/> with no pluralization rules, singularization rules, or u
 18    /// </summary>
 019    public static InflectionRules Empty { get; } = new()
 020    {
 021        Plurals = [],
 022        Singulars = [],
 023        Uncountables = []
 024    };
 25
 26    /// <summary>
 27    /// Gets the collection of pluralization rules, which define how to transform singular words into their plural forms
 28    /// </summary>
 29    public required ImmutableArray<InflectionRule> Plurals { get; init; }
 30
 31    /// <summary>
 32    /// Gets the collection of singularization rules, which define how to transform plural words into their singular for
 33    /// </summary>
 34    public required ImmutableArray<InflectionRule> Singulars { get; init; }
 35
 36    /// <summary>
 37    /// Gets the collection of uncountable words, which are words that do not have a distinct plural form.
 38    /// </summary>
 39    public required ImmutableHashSet<string> Uncountables { get; init; }
 40}
 41

Methods/Properties

.cctor()