-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathSourceFileMergeOptions.cs
More file actions
66 lines (43 loc) · 2.11 KB
/
Copy pathSourceFileMergeOptions.cs
File metadata and controls
66 lines (43 loc) · 2.11 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.IO;
namespace Light.GuardClauses.SourceCodeTransformation;
public sealed record SourceFileMergeOptions
{
public SourceFileMergeOptions()
{
try
{
var repositoryRoot = RepositoryLayout.TryFindRepositoryRoot(
[Directory.GetCurrentDirectory(), AppContext.BaseDirectory]
);
if (repositoryRoot == null)
{
return;
}
TargetFile = Path.Combine(repositoryRoot.FullName, "Light.GuardClauses.SingleFile.cs");
SourceFolder = Path.Combine(repositoryRoot.FullName, "src", "Light.GuardClauses");
}
// ReSharper disable once EmptyGeneralCatchClause
catch { }
}
public string SourceFolder { get; init; } = string.Empty;
public string TargetFile { get; init; } = string.Empty;
public SourceTargetFramework TargetFramework { get; init; } = SourceTargetFramework.NetStandard2_0;
public bool ValidateGeneratedFileBuild { get; init; } = true;
public AssertionWhitelist AssertionWhitelist { get; init; } = new ();
public bool ChangePublicTypesToInternalTypes { get; init; } = true;
public string BaseNamespace { get; init; } = "Light.GuardClauses";
public bool RemoveContractAnnotations { get; init; } = false;
public bool IncludeJetBrainsAnnotations { get; init; } = true;
public bool IncludeJetBrainsAnnotationsUsing { get; init; } = true;
public bool IncludeVersionComment { get; init; } = true;
public bool RemoveOverloadsWithExceptionFactory { get; init; } = false;
public bool IncludeCodeAnalysisNullableAttributes { get; init; } = true;
public bool IncludeValidatedNotNullAttribute { get; init; } = true;
public bool RemoveValidatedNotNull { get; init; } = false;
public bool RemoveDoesNotReturn { get; init; } = false;
public bool RemoveNotNullWhen { get; init; } = false;
public bool IncludeCallerArgumentExpressionAttribute { get; init; } = true;
public bool RemoveCallerArgumentExpressions { get; init; } = false;
public bool RemoveNoEnumeration { get; init; } = false;
}