mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
Remove the CreateArgs() method that is not used by the base class.
This commit is contained in:
parent
79e1a0d300
commit
baf6b445bb
@ -61,8 +61,6 @@ namespace ZonyLrcTools.Cli.Commands
|
||||
|
||||
#endregion
|
||||
|
||||
public override List<string> CreateArgs() => new();
|
||||
|
||||
protected override async Task<int> OnExecuteAsync(CommandLineApplication app)
|
||||
{
|
||||
var files = await ScanMusicFilesAsync();
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using McMaster.Extensions.CommandLineUtils;
|
||||
@ -38,10 +37,5 @@ namespace ZonyLrcTools.Cli.Commands
|
||||
_logger.LogInformation($"目录扫描完成,共扫描到 {result.Sum(f => f.FilePaths.Count)} 个音乐文件。");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override List<string> CreateArgs()
|
||||
{
|
||||
return new();
|
||||
}
|
||||
}
|
||||
}
|
@ -15,14 +15,11 @@ using ZonyLrcTools.Cli.Infrastructure.Extensions;
|
||||
namespace ZonyLrcTools.Cli.Commands
|
||||
{
|
||||
[Command("lyric-tool")]
|
||||
[Subcommand(typeof(ScanCommand), typeof(DownloadCommand))]
|
||||
[Subcommand(typeof(ScanCommand),
|
||||
typeof(DownloadCommand),
|
||||
typeof(UtilityCommand))]
|
||||
public class ToolCommand : ToolCommandBase
|
||||
{
|
||||
public override List<string> CreateArgs()
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
||||
public static async Task<int> Main(string[] args)
|
||||
{
|
||||
ConfigureLogger();
|
||||
|
@ -7,8 +7,6 @@ namespace ZonyLrcTools.Cli.Commands
|
||||
[HelpOption("--help|-h", Description = "欢迎使用 ZonyLrcToolsX Command Line Interface。")]
|
||||
public abstract class ToolCommandBase
|
||||
{
|
||||
public abstract List<string> CreateArgs();
|
||||
|
||||
protected virtual Task<int> OnExecuteAsync(CommandLineApplication app)
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using McMaster.Extensions.CommandLineUtils;
|
||||
|
||||
@ -10,8 +9,6 @@ namespace ZonyLrcTools.Cli.Commands
|
||||
[Command("util", Description = "提供常用的工具类功能。")]
|
||||
public class UtilityCommand : ToolCommandBase
|
||||
{
|
||||
public override List<string> CreateArgs() => new();
|
||||
|
||||
protected override Task<int> OnExecuteAsync(CommandLineApplication app)
|
||||
{
|
||||
return base.OnExecuteAsync(app);
|
||||
|
Loading…
x
Reference in New Issue
Block a user