ServiceCollectionDescriptorExtensions.RemoveAllKeyed 方法

定義

多載

RemoveAllKeyed(IServiceCollection, Type, Object)

移除 collectionserviceType 類型的所有服務。

RemoveAllKeyed<T>(IServiceCollection, Object)

移除 collectionT 類型的所有服務。

RemoveAllKeyed(IServiceCollection, Type, Object)

來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs

移除 collectionserviceType 類型的所有服務。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ RemoveAllKeyed(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, Type ^ serviceType, System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAllKeyed (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Type serviceType, object? serviceKey);
static member RemoveAllKeyed : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type * obj -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function RemoveAllKeyed (collection As IServiceCollection, serviceType As Type, serviceKey As Object) As IServiceCollection

參數

serviceType
Type

要移除的服務類型。

serviceKey
Object

服務金鑰。

傳回

用於鏈結的 IServiceCollection

適用於

RemoveAllKeyed<T>(IServiceCollection, Object)

來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs
來源:
ServiceCollectionDescriptorExtensions.Keyed.cs

移除 collectionT 類型的所有服務。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ RemoveAllKeyed(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAllKeyed<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, object? serviceKey);
static member RemoveAllKeyed : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function RemoveAllKeyed(Of T) (collection As IServiceCollection, serviceKey As Object) As IServiceCollection

類型參數

T

參數

serviceKey
Object

服務金鑰。

傳回

用於鏈結的 IServiceCollection

適用於