-
Notifications
You must be signed in to change notification settings - Fork 0
/
VerbsOptions.cs
29 lines (24 loc) · 909 Bytes
/
VerbsOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using CommandLine;
namespace CodeCoverageBuilder;
[Verb("create", HelpText = "Creates a code coverage HTML report.")]
public class CreateReportOptions
{
private string _projectName = string.Empty;
private string _excludeNamespaces = string.Empty;
[Option('n', "name", Required = true, HelpText = "Test project name.")]
public string TestProjectName
{
get => _projectName;
set => _projectName = !value.Contains(".dll") ? $"{value}.dll" : value;
}
[Option('e', "exclude", Required = false, Default = "", HelpText = "CSV format: namespaces that will be excluded from calculating the project's code coverage.")]
public string ExcludeNamespaces
{
get => _excludeNamespaces;
set => _excludeNamespaces = string.Join(',', value.Split(',').Select(x => $"[*]{x}*"));
}
}
[Verb("version", Hidden = true)]
public class VersionOptions
{
}