-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathCommandlineOptions.cs
More file actions
38 lines (28 loc) · 1.5 KB
/
CommandlineOptions.cs
File metadata and controls
38 lines (28 loc) · 1.5 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
using CommandLine;
using Newtonsoft.Json;
namespace ConfigCrypter.Console.Options
{
public class CommandlineOptions
{
[Option('p', "path", Required = true, HelpText = "Path of the certificate.", Group = "CertLocation")]
public string CertificatePath { get; set; }
[Option('n', "name", Required = true, HelpText = "The subject name of the certificate (CN). This can only be used in Windows environments.", Group = "CertLocation")]
public string CertSubjectName { get; set; }
[Option('s', "password", Required = false, HelpText = "Password of the certificate (if available).", Default = null)]
public string CertificatePassword { get; set; }
[Option('k', "key", Required = true, HelpText = "The key to encrypt in the config file.")]
public string Key { get; set; }
[Option('f', "file", Required = true, HelpText = "The path to the config file.")]
public string ConfigFile { get; set; }
[Option('r', "replace", HelpText = "Replaces the original file if passed as parameter.", Default = false)]
public bool Replace { get; set; }
[Option("format", Default = ConfigFormat.Json, HelpText = "The format of the config file.")]
public ConfigFormat ConfigFormat { get; set; }
[Option('x', "separator", Required = false, HelpText = "Split the key (if the key has multiple value).", Default = ';')]
public char Separator { get; set; }
}
public enum ConfigFormat
{
Json
}
}