28 lines
798 B
C#
28 lines
798 B
C#
using System.CommandLine;
|
|
using MycroForge.Core;
|
|
using MycroForge.Core.Contract;
|
|
|
|
namespace MycroForge.CLI.Commands;
|
|
|
|
public partial class MycroForge
|
|
{
|
|
public partial class Plugin
|
|
{
|
|
public class Init : Command, ISubCommandOf<Plugin>
|
|
{
|
|
private readonly ProjectContext _context;
|
|
|
|
public Init(ProjectContext context) : base("init", "Initialize a basic plugin project")
|
|
{
|
|
_context = context;
|
|
this.SetHandler(ExecuteAsync);
|
|
}
|
|
|
|
private void ExecuteAsync()
|
|
{
|
|
foreach (var plugin in Plugins.Loaded)
|
|
Console.WriteLine($"name: {plugin.Name}, command: {plugin.Command}");
|
|
}
|
|
}
|
|
}
|
|
} |