ServiceCollectionDescriptorExtensions.RemoveAllKeyed 方法

定义

重载

RemoveAllKeyed(IServiceCollection, Type, Object)

删除 collection 中所有 serviceType 类型的服务。

RemoveAllKeyed<T>(IServiceCollection, Object)

删除 collection 中所有 T 类型的服务。

RemoveAllKeyed(IServiceCollection, Type, Object)

Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs

删除 collection 中所有 serviceType 类型的服务。

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)

Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs
Source:
ServiceCollectionDescriptorExtensions.Keyed.cs

删除 collection 中所有 T 类型的服务。

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

适用于