Skip to content

Commit 13b92e0

Browse files
committed
Remove InvocationLifetime class
1 parent ad4ebc9 commit 13b92e0

File tree

4 files changed

+0
-119
lines changed

4 files changed

+0
-119
lines changed

src/System.CommandLine.Hosting/HostingAction.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public override async Task<int> InvokeAsync(ParseResult parseResult, Cancellatio
7272

7373
var bindingContext = GetBindingContext(parseResult);
7474
int registeredBefore = 0;
75-
hostBuilder.UseInvocationLifetime();
7675
hostBuilder.ConfigureServices(services =>
7776
{
7877
services.AddSingleton(parseResult);

src/System.CommandLine.Hosting/HostingExtensions.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ public static CommandLineConfiguration UseHost(
3131
Action<IHostBuilder> configureHost = null
3232
) => UseHost(config, null, configureHost);
3333

34-
public static IHostBuilder UseInvocationLifetime(this IHostBuilder host, Action<InvocationLifetimeOptions> configureOptions = null)
35-
{
36-
return host.ConfigureServices(services =>
37-
{
38-
services.AddSingleton<IHostLifetime, InvocationLifetime>();
39-
if (configureOptions is Action<InvocationLifetimeOptions>)
40-
services.Configure(configureOptions);
41-
});
42-
}
43-
4434
public static OptionsBuilder<TOptions> BindCommandLine<TOptions>(
4535
this OptionsBuilder<TOptions> optionsBuilder)
4636
where TOptions : class

src/System.CommandLine.Hosting/InvocationLifetime.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

src/System.CommandLine.Hosting/InvocationLifetimeOptions.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)