ServiceCollectionDescriptorExtensions.RemoveAll Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RemoveAll(IServiceCollection, Type) |
Removes all services of type |
RemoveAll<T>(IServiceCollection) |
Removes all services of type |
RemoveAll(IServiceCollection, Type)
Removes all services of type serviceType
in IServiceCollection.
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
Parameters
- collection
- IServiceCollection
The IServiceCollection.
- serviceType
- Type
The service type to remove.
Returns
The IServiceCollection for chaining.
Applies to
RemoveAll<T>(IServiceCollection)
Removes all services of type T
in IServiceCollection.
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
Type Parameters
- T
Parameters
- collection
- IServiceCollection
The IServiceCollection.
Returns
The IServiceCollection for chaining.