ServiceCollectionDescriptorExtensions.RemoveAllKeyed 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
| RemoveAllKeyed(IServiceCollection, Type, Object) | Removes all services of type  | 
| RemoveAllKeyed<T>(IServiceCollection, Object) | Removes all services of type  | 
RemoveAllKeyed(IServiceCollection, Type, Object)
Removes all services of type serviceType in IServiceCollection.
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 IServiceCollectionParameters
- collection
- IServiceCollection
The IServiceCollection.
- serviceType
- Type
The service type to remove.
- serviceKey
- Object
The service key.
Returns
The IServiceCollection for chaining.
Applies to
RemoveAllKeyed<T>(IServiceCollection, Object)
Removes all services of type T in IServiceCollection.
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 IServiceCollectionType Parameters
- T
Parameters
- collection
- IServiceCollection
The IServiceCollection.
- serviceKey
- Object
The service key.
Returns
The IServiceCollection for chaining.