ServiceCollectionExtensions.

UseTaskLifetime<TLifetime>(IServiceCollection) Method

Summary

Registers the specified task lifetime type. Only the last registration will be used.
Namespace
Cake.Frosting
Containing Type
ServiceCollectionExtensions

Syntax

public static IServiceCollection UseTaskLifetime<TLifetime>(this IServiceCollection services) 
    where TLifetime : class, IFrostingTaskLifetime

Type Parameters

Name Description
TLifetime The type of the lifetime.

Parameters

Name Type Description
services IServiceCollection The service collection.

Return Value

Type Description
IServiceCollection The same IServiceCollection instance so that multiple calls can be chained.