mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
23 lines
616 B
C#
23 lines
616 B
C#
using System.Collections.Generic;
|
|
using Microsoft.Extensions.CommandLineUtils;
|
|
|
|
namespace AntDesign.Docs.Build.CLI
|
|
{
|
|
public class AppCommandResolver : IAppCommandResolver
|
|
{
|
|
private readonly IEnumerable<IAppCommand> _appCommands;
|
|
|
|
public AppCommandResolver(IEnumerable<IAppCommand> appCommands)
|
|
{
|
|
_appCommands = appCommands;
|
|
}
|
|
|
|
public void Resolve(CommandLineApplication application)
|
|
{
|
|
foreach (var command in _appCommands)
|
|
{
|
|
application.Command(command.Name, command.Execute);
|
|
}
|
|
}
|
|
}
|
|
} |