forked from advanced-security/codeql-development-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeQLFeatureMain.cs
More file actions
48 lines (38 loc) · 1.43 KB
/
Copy pathCodeQLFeatureMain.cs
File metadata and controls
48 lines (38 loc) · 1.43 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
using CodeQLToolkit.Shared.Feature;
using System.CommandLine;
using CodeQLToolkit.Shared.Logging;
using Microsoft.Extensions.Logging;
using CodeQLToolkit.Features.CodeQL.Lifecycle;
using CodeQLToolkit.Features.CodeQL.Commands;
namespace CodeQLToolkit.Features.CodeQL
{
public class CodeQLFeatureMain : IToolkitFeature
{
readonly CodeQLLifecycleFeature lifecycleFeature;
readonly CodeQLCommandFeature commandFeature;
readonly static CodeQLFeatureMain instance;
static CodeQLFeatureMain()
{
instance = new CodeQLFeatureMain();
}
private CodeQLFeatureMain()
{
lifecycleFeature = new CodeQLLifecycleFeature();
commandFeature = new CodeQLCommandFeature();
}
public static CodeQLFeatureMain Instance => instance;
public int Run()
{
return 0;
}
public void Register(Command parentCommand)
{
var queryCommand = new Command("codeql", "Use the features related to managing the version of CodeQL used by this repository.");
parentCommand.Add(queryCommand);
Log<CodeQLFeatureMain>.G().LogInformation("Registering scaffolding submodule.");
lifecycleFeature.Register(queryCommand);
Log<CodeQLFeatureMain>.G().LogInformation("Registering command submodule.");
commandFeature.Register(queryCommand);
}
}
}