feat(Program.cs): Hosting-Unterstützung zu CommandManagerRunner hinzufügen
- Einführung von `Microsoft.Extensions.Hosting` in `DependencyInjection.cs`. - Überladung für `RunCommandManagerRunner` hinzugefügt, um `IHost` zu akzeptieren. - Aktualisiert `Program.cs`, um die neue Methode `RunCommandManagerRunner` zu verwenden.
This commit is contained in:
parent
e171b50868
commit
54c17f106e
@ -8,6 +8,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace EnvelopeGenerator.Terminal;
|
||||
|
||||
@ -48,4 +49,6 @@ public static class DependencyInjection
|
||||
var runner = provider.GetRequiredService<AppRunner<CommandManager>>();
|
||||
return runner.RunAsync(args);
|
||||
}
|
||||
|
||||
public static Task<int> RunCommandManagerRunner(this IHost host, string[] args) => host.Services.RunCommandManagerRunner(args);
|
||||
}
|
||||
|
||||
@ -14,6 +14,6 @@ public class Program
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
return await app.Services.RunCommandManagerRunner(args);
|
||||
return await app.RunCommandManagerRunner(args);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user