From 54c17f106ea06f4491bab15d40c996664a79ba47 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 14 Apr 2025 13:18:50 +0200 Subject: [PATCH] =?UTF-8?q?feat(Program.cs):=20Hosting-Unterst=C3=BCtzung?= =?UTF-8?q?=20zu=20CommandManagerRunner=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- EnvelopeGenerator.Terminal/DependencyInjection.cs | 3 +++ EnvelopeGenerator.Terminal/Program.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Terminal/DependencyInjection.cs b/EnvelopeGenerator.Terminal/DependencyInjection.cs index 48cc9895..e233b5c3 100644 --- a/EnvelopeGenerator.Terminal/DependencyInjection.cs +++ b/EnvelopeGenerator.Terminal/DependencyInjection.cs @@ -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>(); return runner.RunAsync(args); } + + public static Task RunCommandManagerRunner(this IHost host, string[] args) => host.Services.RunCommandManagerRunner(args); } diff --git a/EnvelopeGenerator.Terminal/Program.cs b/EnvelopeGenerator.Terminal/Program.cs index c99a6dab..2aed708a 100644 --- a/EnvelopeGenerator.Terminal/Program.cs +++ b/EnvelopeGenerator.Terminal/Program.cs @@ -14,6 +14,6 @@ public class Program var app = builder.Build(); - return await app.Services.RunCommandManagerRunner(args); + return await app.RunCommandManagerRunner(args); } } \ No newline at end of file