共用方式為


ServiceCollectionDescriptorExtensions.RemoveAll 方法

定義

多載

RemoveAll(IServiceCollection, Type)

移除 IServiceCollectionserviceType 類型的所有服務。

RemoveAll<T>(IServiceCollection)

移除 IServiceCollectionT 類型的所有服務。

RemoveAll(IServiceCollection, Type)

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

移除 IServiceCollectionserviceType 類型的所有服務。

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

參數

serviceType
Type

要移除的服務類型。

傳回

用於鏈結的 IServiceCollection

適用於

RemoveAll<T>(IServiceCollection)

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

移除 IServiceCollectionT 類型的所有服務。

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

參數

傳回

用於鏈結的 IServiceCollection

適用於