ServiceCollectionDescriptorExtensions.RemoveAllKeyed Method
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.
RemoveAllKeyed(IServiceCollection, Type, Object) |
Removes all services of type |
RemoveAllKeyed<T>(IServiceCollection, Object) |
Removes all services of type |
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 IServiceCollection
Parameters
- collection
- IServiceCollection
The IServiceCollection.
- serviceType
- Type
The service type to remove.
- serviceKey
- Object
The service key.
Returns
The IServiceCollection for chaining.
Applies to
.NET 9 (package-provided) y otras versiones
Producto | Versiones |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
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 IServiceCollection
Type Parameters
- T
Parameters
- collection
- IServiceCollection
The IServiceCollection.
- serviceKey
- Object
The service key.
Returns
The IServiceCollection for chaining.
Applies to
.NET 9 (package-provided) y otras versiones
Producto | Versiones |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: