Class ServiceCollectionExtensions
- Namespace
- ZeroInstall.Services
- Assembly
- ZeroInstall.Services.dll
Provides extension methods for IServiceCollection.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
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
IServiceCollectionThe service collection to add the services to.
configuration
IConfigurationAn optional configuration source for building Config instead of the default config files.
Returns
- 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
IServiceCollectionThe service collection to add the services to.
configuration
IConfigurationAn optional configuration source for building Config instead of the default config files.
Returns
Type Parameters
TTaskHandler
A callback object used when the user needs to be asked questions or informed about download and IO tasks.