-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
31 lines (30 loc) · 1.79 KB
/
Program.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
using CilOut.Commands;
Spectre.Console.Cli.CommandApp app = new ();
app.Configure (config => {
config.Settings.ApplicationName = "cilout";
config.AddBranch<AssemblySettings> ("assembly", add => {
add.SetDescription ("Assembly to analyze");
add.AddCommand<AssemblyFingerprintCommand> ("fingerprint")
.WithDescription ("Generate a fingerprint of the assembly to detect future changes.");
add.AddCommand<AssemblyIsTrimmableCommand> ("is-trimmable")
.WithDescription ("Check for the presence of [[assembly: AssemblyMetadata (\"Trimmable\", \"true\")]] inside the specified assembly.");
add.AddCommand<AssemblyHasEntryPointCommand> ("has-entrypoint")
.WithDescription ("Check if the specified assembly has an entry point (e.g. `Main`) defined.");
add.AddCommand<AssemblyReferencesCommand>("references")
.WithAlias ("refs")
.WithDescription ("Show the metadata references, as a tree, inside the specified assembly.");
add.AddCommand<AssemblyDefinitionsCommand>("definitions")
.WithAlias ("defs")
.WithDescription ("Show the metadata definitions, as a tree, inside the specified assembly.");
});
config.AddBranch<AppBundleSettings> ("appbundle", add => {
add.SetDescription ("Application Bundle to analyze");
add.AddCommand<AppBundleFingerprintCommand> ("fingerprint")
.WithDescription ("Generate a fingerprint of the appbundle to detect future changes.");
add.AddCommand<AppBundleIsTrimmableCommand> ("is-trimmable")
.WithDescription ("Check for the presence of [[assembly: AssemblyMetadata (\"Trimmable\", \"true\")]] inside any assemblies of the appbundle.");
add.AddCommand<AppBundleHasEntryPointCommand> ("has-entrypoint")
.WithDescription ("Check if the specified application bundle has an assembly with an entry point (e.g. `Main`) defined.");
});
});
return app.Run (args);