< Summary

Information
Class: MyNet.Text.Redaction.TextRedactionOptions
Assembly: MyNet.Text
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Text/Redaction/TextRedactionOptions.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 39
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
set_ShowStart(...)50%22100%
set_ShowEnd(...)50%22100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Text/Redaction/TextRedactionOptions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="TextRedactionOptions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8
 9namespace MyNet.Text.Redaction;
 10
 11/// <summary>
 12/// Options for fixed-mask redaction.
 13/// </summary>
 14public sealed record TextRedactionOptions
 15{
 16    /// <summary>
 17    /// Gets the number of leading characters kept visible.
 18    /// </summary>
 19    public int ShowStart
 20    {
 21        get;
 622        init => field = value < 0 ? throw new ArgumentOutOfRangeException(nameof(value)) : value;
 23    }
 24
 25    /// <summary>
 26    /// Gets the number of trailing characters kept visible.
 27    /// </summary>
 28    public int ShowEnd
 29    {
 30        get;
 631        init => field = value < 0 ? throw new ArgumentOutOfRangeException(nameof(value)) : value;
 32    }
 33
 34    /// <summary>
 35    /// Gets the mask character used for hidden characters.
 36    /// </summary>
 37    public char MaskCharacter { get; init; } = '*';
 38}
 39