ServiceCollectionDescriptorExtensions.RemoveAllKeyed 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RemoveAllKeyed(IServiceCollection, Type, Object) |
删除 |
RemoveAllKeyed<T>(IServiceCollection, Object) |
删除 |
RemoveAllKeyed(IServiceCollection, Type, Object)
删除 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
参数
- collection
- IServiceCollection
- serviceType
- Type
要删除的服务类型。
- serviceKey
- Object
服务密钥。
返回
用于链接的 IServiceCollection。
适用于
RemoveAllKeyed<T>(IServiceCollection, Object)
删除 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
参数
- collection
- IServiceCollection
- serviceKey
- Object
服务密钥。
返回
用于链接的 IServiceCollection。