forked from UbiquityDotNET/Ubiquity.NET.Utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.cs
More file actions
26 lines (20 loc) · 1.01 KB
/
input.cs
File metadata and controls
26 lines (20 loc) · 1.01 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
using System.IO;
using Ubiquity.NET.CommandLine.GeneratorAttributes;
namespace TestNamespace;
[RootCommand( Description = "Root command for tests" )]
internal partial class TestOptions
{
[Option( "-o", Description = "Test SomePath" )]
[FolderValidation( FolderValidation.CreateIfNotExist )]
public required DirectoryInfo SomePath { get; init; }
[Option( "-b", Description = "Test Some existing Path" )]
[FolderValidation( FolderValidation.ExistingOnly )]
public required DirectoryInfo SomeExistingPath { get; init; }
[Option( "--thing1", Aliases = [ "-t" ], Required = true, Description = "Test Thing1", HelpName = "Help name for thing1" )]
public bool Thing1 { get; init; }
// This should be ignored by generator
public string? NotAnOption { get; set; }
[Option( "-a", Hidden = true, Required = false, ArityMin = 0, ArityMax = 1, Description = "Test SomeOtherPath" )]
[FileValidation( FileValidation.ExistingOnly )]
public required FileInfo SomeOtherPath { get; init; }
}