AddCliInvoke(IServiceCollection, ServiceLifetime) Method

Definition

Assembly CliInvoke.dll

Registers CliInvoke's core types and middleware in the DI container.

public static IServiceCollection AddCliInvoke(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Scoped)

Parameters

services
IServiceCollection

The service collection to add to.

lifetime
ServiceLifetime

The service lifetime to use if specified; Scoped otherwise.

Returns

IServiceCollection
The updated service collection with the added CliInvoke services set up.