mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
refactor: Rename main method.
This commit is contained in:
parent
ba3dd5f1bc
commit
ed1974dfbc
@ -7,15 +7,16 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
using ZonyLrcTools.Cli.Commands;
|
||||
using ZonyLrcTools.Cli.Infrastructure.DependencyInject;
|
||||
using ZonyLrcTools.Cli.Infrastructure.Exceptions;
|
||||
|
||||
namespace ZonyLrcTools.Cli.Commands
|
||||
namespace ZonyLrcTools.Cli
|
||||
{
|
||||
[Command("lyric-tool")]
|
||||
[Subcommand(typeof(DownloadCommand),
|
||||
typeof(UtilityCommand))]
|
||||
public class ToolCommand : ToolCommandBase
|
||||
public class Program : ToolCommandBase
|
||||
{
|
||||
public static async Task<int> Main(string[] args)
|
||||
{
|
||||
@ -78,11 +79,11 @@ namespace ZonyLrcTools.Cli.Commands
|
||||
.ConfigureServices((_, services) =>
|
||||
{
|
||||
services.AddSingleton(PhysicalConsole.Singleton);
|
||||
services.BeginAutoDependencyInject<ToolCommand>();
|
||||
services.BeginAutoDependencyInject<Program>();
|
||||
services.ConfigureConfiguration();
|
||||
services.ConfigureToolService();
|
||||
})
|
||||
.RunCommandLineApplicationAsync<ToolCommand>(args);
|
||||
.RunCommandLineApplicationAsync<Program>(args);
|
||||
}
|
||||
|
||||
private static int HandleException(Exception ex)
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ZonyLrcTools.Cli;
|
||||
using ZonyLrcTools.Cli.Commands;
|
||||
using ZonyLrcTools.Cli.Infrastructure.DependencyInject;
|
||||
|
||||
@ -20,7 +21,7 @@ namespace ZonyLrcTools.Tests
|
||||
{
|
||||
var service = new ServiceCollection();
|
||||
|
||||
service.BeginAutoDependencyInject<ToolCommand>();
|
||||
service.BeginAutoDependencyInject<Program>();
|
||||
service.ConfigureToolService();
|
||||
service.ConfigureConfiguration();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user