< Summary - SonghayCore

Information
Class: Songhay.Models.ProgramArgs
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/ProgramArgs.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 67
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%2100%
get_Args()100%1100%
get_HelpSet()100%1100%

File(s)

/home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/ProgramArgs.cs

#LineLine coverage
 1namespace Songhay.Models;
 2
 3/// <summary>
 4/// Defines conventional command-line arguments.
 5/// </summary>
 6public class ProgramArgs
 7{
 8    /// <summary>
 9    /// Initializes a new instance of the <see cref="ProgramArgs"/> class.
 10    /// </summary>
 11    /// <param name="args">The arguments.</param>
 1612    public ProgramArgs(string?[] args)
 1613    {
 1614        Args = args.OfType<string>().ToArray();
 2915        if (Args.Any()) HelpSet = new Dictionary<string, string>(capacity: Args.Length);
 1616    }
 17
 18    /// <summary>
 19    /// The base-path argument.
 20    /// </summary>
 21    public const string BasePath = "--base-path";
 22
 23    /// <summary>
 24    /// The base path required argument.
 25    /// </summary>
 26    public const string BasePathRequired = "--base-path-required";
 27
 28    /// <summary>
 29    /// The help argument.
 30    /// </summary>
 31    public const string Help = "--help";
 32
 33    /// <summary>
 34    /// The input file argument.
 35    /// </summary>
 36    public const string InputFile = "--input-file";
 37
 38    /// <summary>
 39    /// The input <see cref="string" /> argument.
 40    /// </summary>
 41    public const string InputString = "--input-string";
 42
 43    /// <summary>
 44    /// The output file argument.
 45    /// </summary>
 46    public const string OutputFile = "--output-file";
 47
 48    /// <summary>
 49    /// Use the output file argument relative to <see cref="ProgramArgs.BasePath"/>.
 50    /// </summary>
 51    public const string OutputUnderBasePath = "--output-under-base-path";
 52
 53    /// <summary>
 54    /// The settings file argument.
 55    /// </summary>
 56    public const string SettingsFile = "--settings-file";
 57
 58    /// <summary>
 59    /// Gets the arguments.
 60    /// </summary>
 14261    public string[] Args { get; }
 62
 63    /// <summary>
 64    /// Gets the help set.
 65    /// </summary>
 4066    public Dictionary<string, string> HelpSet { get; } = new();
 67}