< Summary

Information
Class: MyNet.Utilities.Progress.ProgressMessage
Assembly: MyNet.Utilities
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Utilities/Progress/ProgressMessage.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 28
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToString()100%22100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Utilities/Progress/ProgressMessage.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ProgressMessage.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System.Globalization;
 8
 9namespace MyNet.Utilities.Progress;
 10
 11/// <summary>
 12/// Represents a localizable progress message with optional format parameters.
 13/// </summary>
 14/// <param name="Message">The message string. May contain format placeholders (e.g. <c>{0}</c>) resolved by <paramref na
 15/// <param name="Parameters">Optional format parameters passed to <see cref="string.Format(string, object[])"/> when <se
 16public sealed record ProgressMessage(string Message, params object[] Parameters)
 17{
 18    /// <summary>
 19    /// Returns the formatted message string.
 20    /// When <see cref="Parameters"/> is non-empty the message is treated as a composite-format string;
 21    /// otherwise the raw <see cref="Message"/> value is returned.
 22    /// </summary>
 23    public override string ToString()
 4224        => Parameters.Length > 0
 4225            ? string.Format(CultureInfo.CurrentCulture, Message, Parameters)
 4226            : Message;
 27}
 28

Methods/Properties

ToString()