Table of Contents

Class ServiceCollectionExtensions

Namespace
ZeroInstall.Services
Assembly
ZeroInstall.Services.dll

Provides extension methods for IServiceCollection.

public static class ServiceCollectionExtensions
Inheritance
object
ServiceCollectionExtensions

Methods

AddZeroInstall(IServiceCollection, IConfiguration?)

Registers a set of scoped services for using Zero Install functionality. Automatically uses ILogger<TCategoryName> and ICredentialProvider if registered in services.

public static IServiceCollection AddZeroInstall(this IServiceCollection services, IConfiguration? configuration = null)

Parameters

services IServiceCollection
configuration IConfiguration

An optional configuration source for building Config instead of the default config files.

Returns

IServiceCollection
See Also

AddZeroInstall<TTaskHandler>(IServiceCollection, IConfiguration?)

Registers a set of scoped services for using Zero Install functionality.

public static IServiceCollection AddZeroInstall<TTaskHandler>(this IServiceCollection services, IConfiguration? configuration = null) where TTaskHandler : class, ITaskHandler

Parameters

services IServiceCollection
configuration IConfiguration

An optional configuration source for building Config instead of the default config files.

Returns

IServiceCollection

Type Parameters

TTaskHandler

A callback object used when the user needs to be asked questions or informed about download and IO tasks.