-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (27 loc) · 1.49 KB
/
Copy pathProgram.cs
File metadata and controls
33 lines (27 loc) · 1.49 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
using System.CommandLine;
using DotNetReflectCLI.Services;
using DotNetReflectCLI.Commands;
namespace DotNetReflectCLI;
class Program
{
static async Task<int> Main(string[] args)
{
var rootCommand = new RootCommand("rust-reflect-cli - Утилита для анализа и работы с декомпилированным Rust .NET кодом");
var decompilationService = new DecompilationService();
var analysisService = new AnalysisService(decompilationService);
var inputOption = new Option<FileInfo>(
"--input",
"Input assembly file or directory containing assemblies"
) { IsRequired = true };
// Добавляем команды декомпиляции
rootCommand.AddCommand(DecompilationCommands.CreateDecompileCommand(decompilationService, inputOption));
rootCommand.AddCommand(DecompilationCommands.CreateDecompileTypeCommand(decompilationService, inputOption));
rootCommand.AddCommand(DecompilationCommands.CreateDecompileMethodCommand(decompilationService, inputOption));
// Добавляем команды анализа
rootCommand.AddCommand(new AnalyzeCommand(analysisService));
rootCommand.AddCommand(AnalysisCommands.CreateMethodAnalysisCommand(analysisService));
rootCommand.AddCommand(AnalysisCommands.CreateSearchCommand(analysisService));
rootCommand.AddCommand(new HelpCommand());
return await rootCommand.InvokeAsync(args);
}
}