ServiceCollectionServiceExtensions 類別

定義

將服務新增至 IServiceCollection 的擴充方法。

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

方法

AddKeyedScoped(IServiceCollection, Type, Object)

serviceType 中指定類型的範圍服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的範圍服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddKeyedScoped(IServiceCollection, Type, Object, Type)

serviceType 中指定類型的範圍服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object)

TService 中指定類型的範圍服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的範圍服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddKeyedScoped<TService>(IServiceCollection, Object)

TService 中指定類型的範圍服務,新增至指定的 IServiceCollection

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

TService 中指定類型的範圍服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object)

serviceType 中指定類型的單一服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的單一服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object, Object)

serviceType 中指定類型的單一服務,以及 implementationInstance 中指定的執行個體,新增至指定的 IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, Object, Type)

serviceType 中指定類型的單一服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

TService 中指定類型的單一服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的單一服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, Object)

TService 中指定類型的單一服務,新增至指定的 IServiceCollection

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

TService 中指定類型的單一服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, Object, TService)

TService 中指定類型的單一服務,以及 implementationInstance 中指定的執行個體,新增至指定的 IServiceCollection

AddKeyedTransient(IServiceCollection, Type, Object)

serviceType 中指定類型的暫時性服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的暫時性服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddKeyedTransient(IServiceCollection, Type, Object, Type)

serviceType 中指定類型的暫時性服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object)

TService 中指定類型的暫時性服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的暫時性服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddKeyedTransient<TService>(IServiceCollection, Object)

TService 中指定類型的暫時性服務,新增至指定的 IServiceCollection

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

TService 中指定類型的暫時性服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddScoped(IServiceCollection, Type)

serviceType 中指定類型的範圍服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的範圍服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddScoped(IServiceCollection, Type, Type)

serviceType 中指定類型的範圍服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddScoped<TService,TImplementation>(IServiceCollection)

TService 中指定類型的範圍服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的範圍服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddScoped<TService>(IServiceCollection)

TService 中指定類型的範圍服務,新增至指定的 IServiceCollection

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

TService 中指定類型的範圍服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddSingleton(IServiceCollection, Type)

serviceType 中指定類型的單一服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的單一服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddSingleton(IServiceCollection, Type, Object)

serviceType 中指定類型的單一服務,以及 implementationInstance 中指定的執行個體,新增至指定的 IServiceCollection

AddSingleton(IServiceCollection, Type, Type)

serviceType 中指定類型的單一服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddSingleton<TService,TImplementation>(IServiceCollection)

TService 中指定類型的單一服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的單一服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddSingleton<TService>(IServiceCollection)

TService 中指定類型的單一服務,新增至指定的 IServiceCollection

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

TService 中指定類型的單一服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddSingleton<TService>(IServiceCollection, TService)

TService 中指定類型的單一服務,以及 implementationInstance 中指定的執行個體,新增至指定的 IServiceCollection

AddTransient(IServiceCollection, Type)

serviceType 中指定類型的暫時性服務,新增至指定的 IServiceCollection

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

serviceType 中指定類型的暫時性服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

AddTransient(IServiceCollection, Type, Type)

serviceType 中指定類型的暫時性服務,以及在 implementationType 中指定類型的實作,新增至指定的 IServiceCollection

AddTransient<TService,TImplementation>(IServiceCollection)

TService 中指定類型的暫時性服務,以及在 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

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

使用 implementationFactory 中指定的 Factory,將 TService 中指定類型的暫時性服務,以及 TImplementation 中指定的實作類型,新增至指定的 IServiceCollection

AddTransient<TService>(IServiceCollection)

TService 中指定類型的暫時性服務,新增至指定的 IServiceCollection

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

TService 中指定類型的暫時性服務,以及 implementationFactory 中指定的 Factory,新增至指定的 IServiceCollection

適用於