-
Home
-
API Reference
-
CliInvoke.Extensions
-
AddCliInvokeExtensions
-
Methods
-
AddCliInvoke(IServiceCollection, ServiceLifetime)
AddCliInvoke(IServiceCollection, ServiceLifetime) Method
Definition
Registers CliInvoke's core types and middleware in the DI container.
public static IServiceCollection AddCliInvoke(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Scoped)
Parameters
- lifetime
- ServiceLifetime
The service lifetime to use if specified; Scoped otherwise.
Returns
- IServiceCollection
- The updated service collection with the added CliInvoke services set up.