Show / Hide Table of Contents

Class ServiceCollectionExtensions

Provides extension methods for IServiceCollection.

Inheritance
Object
ServiceCollectionExtensions
Namespace: ZeroInstall.Services
Assembly: ZeroInstall.Services.dll
Syntax
public static class ServiceCollectionExtensions : Object

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.

Declaration
public static IServiceCollection AddZeroInstall(this IServiceCollection services, IConfiguration configuration = null)
Parameters
Type Name Description
IServiceCollection services

The service collection to add the services to.

IConfiguration configuration

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

Returns
Type Description
IServiceCollection
See Also
ConfigureCredentials(IServiceCollection, IConfiguration)

AddZeroInstall<TTaskHandler>(IServiceCollection, IConfiguration)

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

Declaration
public static IServiceCollection AddZeroInstall<TTaskHandler>(this IServiceCollection services, IConfiguration configuration = null)
    where TTaskHandler : class, ITaskHandler
Parameters
Type Name Description
IServiceCollection services

The service collection to add the services to.

IConfiguration configuration

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

Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TTaskHandler

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

In This Article
Back to top Copyright Bastian Eicher et al