ServiceCollectionServiceExtensions 类

定义

用于向 . IServiceCollection. 添加服务的扩展方法。

public ref class ServiceCollectionServiceExtensions abstract sealed
public static class ServiceCollectionServiceExtensions
type ServiceCollectionServiceExtensions = class
Public Module ServiceCollectionServiceExtensions
继承
ServiceCollectionServiceExtensions

方法

名称 说明
AddKeyedScoped(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

serviceType 中指定的类型的作用域服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedScoped(IServiceCollection, Type, Object, Type)

serviceType 中指定的类型的作用域服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddKeyedScoped(IServiceCollection, Type, Object)

serviceType 中指定的类型的作用域服务添加到指定的 IServiceCollection

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

使用指定 TService 中指定的工厂将 TImplementation 中指定的类型的范围服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object)

TService 中指定的类型的作用域服务添加到指定 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddKeyedScoped<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

TService 中指定的类型的作用域服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedScoped<TService>(IServiceCollection, Object)

TService 中指定的类型的作用域服务添加到指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

serviceType 中指定的类型的单一实例服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object, Object)

serviceType 中指定的类型的单一实例服务,并在 implementationInstance 中指定的实例添加到指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object, Type)

serviceType 中指定的类型的单一实例服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object)

serviceType 中指定的类型的单一实例服务添加到指定的 IServiceCollection

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

使用 TService 中指定的工厂将 TImplementation 中指定的类型的单一实例服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

TService 中指定的类型的单一实例服务添加到指定 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

TService 中指定的类型的单一实例服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, Object, TService)

TService 中指定的类型的单一实例服务,并在 implementationInstance 中指定的实例添加到指定的 IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, Object)

TService 中指定的类型的单一实例服务添加到指定的 IServiceCollection

AddKeyedTransient(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

serviceType 中指定的类型的暂时性服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedTransient(IServiceCollection, Type, Object, Type)

serviceType 中指定的类型的暂时性服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddKeyedTransient(IServiceCollection, Type, Object)

serviceType 中指定的类型的暂时性服务添加到指定的 IServiceCollection

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

使用 TService 中指定的工厂将 TImplementation 中指定的类型的暂时性服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object)

TService 中指定的类型的暂时性服务添加到指定的 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddKeyedTransient<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

TService 中指定的类型的暂时性服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddKeyedTransient<TService>(IServiceCollection, Object)

TService 中指定的类型的暂时性服务添加到指定的 IServiceCollection

AddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>)

serviceType 中指定的类型的作用域服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddScoped(IServiceCollection, Type, Type)

serviceType 中指定的类型的作用域服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddScoped(IServiceCollection, Type)

serviceType 中指定的类型的作用域服务添加到指定的 IServiceCollection

AddScoped<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

使用指定 TService 中指定的工厂将 TImplementation 中指定的类型的范围服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddScoped<TService,TImplementation>(IServiceCollection)

TService 中指定的类型的作用域服务添加到指定 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>)

TService 中指定的类型的作用域服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddScoped<TService>(IServiceCollection)

TService 中指定的类型的作用域服务添加到指定的 IServiceCollection

AddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

serviceType 中指定的类型的单一实例服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddSingleton(IServiceCollection, Type, Object)

serviceType 中指定的类型的单一实例服务,并在 implementationInstance 中指定的实例添加到指定的 IServiceCollection

AddSingleton(IServiceCollection, Type, Type)

serviceType 中指定的类型的单一实例服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddSingleton(IServiceCollection, Type)

serviceType 中指定的类型的单一实例服务添加到指定的 IServiceCollection

AddSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

使用 TService 中指定的工厂将 TImplementation 中指定的类型的单一实例服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddSingleton<TService,TImplementation>(IServiceCollection)

TService 中指定的类型的单一实例服务添加到指定 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

TService 中指定的类型的单一实例服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddSingleton<TService>(IServiceCollection, TService)

TService 中指定的类型的单一实例服务,并在 implementationInstance 中指定的实例添加到指定的 IServiceCollection

AddSingleton<TService>(IServiceCollection)

TService 中指定的类型的单一实例服务添加到指定的 IServiceCollection

AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>)

serviceType 中指定的类型的暂时性服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddTransient(IServiceCollection, Type, Type)

serviceType 中指定的类型的暂时性服务添加到指定 implementationType 中指定的类型的实现添加到指定的 IServiceCollection

AddTransient(IServiceCollection, Type)

serviceType 中指定的类型的暂时性服务添加到指定的 IServiceCollection

AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

使用 TService 中指定的工厂将 TImplementation 中指定的类型的暂时性服务添加到指定的 implementationFactoryIServiceCollection 中指定的实现类型。

AddTransient<TService,TImplementation>(IServiceCollection)

TService 中指定的类型的暂时性服务添加到指定的 TImplementation 中指定的实现类型添加到指定的 IServiceCollection

AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>)

TService 中指定的类型的暂时性服务添加到指定 implementationFactory 中指定的工厂添加到指定的 IServiceCollection

AddTransient<TService>(IServiceCollection)

TService 中指定的类型的暂时性服务添加到指定的 IServiceCollection

适用于