< Summary

Information
Class: MyNet.Text.Truncation.Truncator
Assembly: MyNet.Text
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Text/Truncation/Truncator.cs
Tag: 323_28699572109
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 29
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.Text/Truncation/Truncator.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="Truncator.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.Text.Truncation;
 8
 9/// <summary>
 10/// Provides predefined text truncators for common truncation scenarios, such as truncating to a fixed length, a fixed n
 11/// </summary>
 12public static class Truncator
 13{
 14    /// <summary>
 15    /// Gets or sets a truncator that truncates text to a fixed length, optionally adding a truncation string (e.g. elli
 16    /// </summary>
 017    public static FixedLengthTextTruncator FixedLength { get; set; } = new(new() { Length = 100, TruncationString = "...
 18
 19    /// <summary>
 20    /// Gets or sets a truncator that truncates text to a fixed number of characters, optionally adding a truncation str
 21    /// </summary>
 022    public static FixedNumberOfCharactersTextTruncator FixedNumberOfCharacters { get; set; } = new(new() { Length = 100,
 23
 24    /// <summary>
 25    /// Gets or sets a truncator that truncates text to a fixed number of words, optionally adding a truncation string (
 26    /// </summary>
 027    public static FixedNumberOfWordsTextTruncator FixedNumberOfWords { get; set; } = new(new() { Length = 100, Truncatio
 28}
 29

Methods/Properties

.cctor()