21 lines
647 B
C#
21 lines
647 B
C#
using System.CommandLine;
|
|
using MicroForge.CLI.Commands.Interfaces;
|
|
using MicroForge.CLI.Features;
|
|
|
|
namespace MicroForge.CLI.Commands;
|
|
|
|
public partial class MicroForge
|
|
{
|
|
public partial class Add
|
|
{
|
|
public class Api : Command, ISubCommandOf<Add>
|
|
{
|
|
public Api(ProjectContext context, IEnumerable<IFeature> features) :
|
|
base("api", "Add FastAPI to your project")
|
|
{
|
|
var feature = features.First(f => f.Name == Features.Api.FeatureName);
|
|
this.SetHandler(async () => await feature.ExecuteAsync(context));
|
|
}
|
|
}
|
|
}
|
|
} |