< Summary

Information
Class: MyNet.Humanizer.Display.Registration.DisplayTextStrategyRegistration<T>
Assembly: MyNet.Humanizer
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Humanizer/Display/Registration/DisplayTextStrategyRegistration.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 25
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
get_TargetType()100%11100%
get_Strategy()100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Humanizer/Display/Registration/DisplayTextStrategyRegistration.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="DisplayTextStrategyRegistration.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8
 9namespace MyNet.Humanizer.Display.Registration;
 10
 11/// <summary>
 12/// Represents a registration of a display text strategy for a specific target type T.
 13/// </summary>
 14/// <param name="strategy">The display text strategy instance.</param>
 15/// <typeparam name="T">The target type for which the display text strategy is registered.</typeparam>
 16public sealed class DisplayTextStrategyRegistration<T>(IDisplayTextStrategy<T> strategy) : IDisplayTextStrategyRegistrat
 17    where T : notnull
 18{
 19    /// <inheritdoc/>
 4220    public Type TargetType => typeof(T);
 21
 22    /// <inheritdoc/>
 4223    public IDisplayTextStrategy Strategy => strategy;
 24}
 25

Methods/Properties

get_TargetType()
get_Strategy()