forked from Plasma/AzureBlobUtility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.cs
44 lines (33 loc) · 1.71 KB
/
Options.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using CommandLine;
using CommandLine.Text;
namespace BlobUtility
{
public class Options
{
[Option('k', "key", HelpText = "Blob storage Access Key.", Required = true)]
public string Key { get; set; }
[Option('a', "account", HelpText = "Blob storage Account Name.", Required = true)]
public string Account { get; set; }
[Option('c', "container", HelpText = "Blob storage Container Name.", Required = true)]
public string Container { get; set; }
[OptionArray('s', "source", HelpText = "Specifies the local files/directories to upload.")]
public string[] Sources { get; set; }
[Option('d', "destination", DefaultValue = "", HelpText = "Specifies the destination filename/directory to upload to.")]
public string Directory { get; set; }
[Option('f', "force", DefaultValue = false, HelpText = "Force overwrite of any existing blobs.")]
public bool Force { get; set; }
[Option("download", DefaultValue = false, HelpText = "Download the specified source file instead of uploading.")]
public bool Download { get; set; }
[Option("brief", DefaultValue = false, HelpText = "Show minimal log information.")]
public bool Brief { get; set; }
[Option("getDefaultServiceVersion", DefaultValue = false, HelpText = "Display the current default Service (API) Version for the storage service.")]
public bool GetApiVersion { get; set; }
[Option("setDefaultServiceVersion", DefaultValue = null, HelpText = "Change the default Service (API) Version for the storage service.")]
public string SetApiVersion { get; set; }
[HelpOption]
public string GetUsage()
{
return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current));
}
}
}