Skip to content

InternalServiceCollectionExtensions.AddFromExisting(IServiceCollection, Type, Type)

AddFromExisting(IServiceCollection, Type, Type)

staticextension
View source
public static void AddFromExisting(this IServiceCollection services, Type service, Type implementation)
Registers an existing registration of implementation as a provider of service type service.

Parameters

servicesIServiceCollection
The service collection.
serviceType
The service type being provided.
implementationType
The implementation of service.