Method Remove
Remove(IServiceCollection, Type)
Removes all service descriptors of the specified serviceType
from the services
collection.
public static IServiceCollection Remove(this IServiceCollection services, Type serviceType)
Parameters
services
IServiceCollectionThe IServiceCollection to remove service descriptors from.
serviceType
TypeThe type of the service descriptors to remove.
Returns
- IServiceCollection
The modified IServiceCollection.
Remove<T>(IServiceCollection)
Removes all service descriptors of the specified type T
from the services
collection.
public static IServiceCollection Remove<T>(this IServiceCollection services)
Parameters
services
IServiceCollectionThe IServiceCollection to remove service descriptors from.
Returns
- IServiceCollection
The modified IServiceCollection.
Type Parameters
T
The type of the service descriptors to remove.