ServiceCollectionDescriptorExtensions.RemoveAll 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RemoveAll(IServiceCollection, Type) |
删除 IServiceCollection 中所有 |
RemoveAll<T>(IServiceCollection) |
删除 IServiceCollection 中所有 |
RemoveAll(IServiceCollection, Type)
删除 IServiceCollection 中所有 serviceType
类型的服务。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ RemoveAll(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, Type ^ serviceType);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAll (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Type serviceType);
static member RemoveAll : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function RemoveAll (collection As IServiceCollection, serviceType As Type) As IServiceCollection
参数
- collection
- IServiceCollection
- serviceType
- Type
要删除的服务类型。
返回
用于链接的 IServiceCollection。
适用于
RemoveAll<T>(IServiceCollection)
删除 IServiceCollection 中所有 T
类型的服务。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ RemoveAll(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAll<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection);
static member RemoveAll : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function RemoveAll(Of T) (collection As IServiceCollection) As IServiceCollection
类型参数
- T
参数
- collection
- IServiceCollection
返回
用于链接的 IServiceCollection。