Method AddSubtypesOf
| Improve this Doc View SourceAddSubtypesOf<TSupertype>(IServiceCollection, ServiceLifetime)
Adds the subtypes that implement the contract specified by TSupertype
to the service collection, using the assemblies loaded by Plugin
Declaration
public static IServiceCollection AddSubtypesOf<TSupertype>(this IServiceCollection services, ServiceLifetime serviceLifetime)
where TSupertype : class
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The IService |
Service |
serviceLifetime | Specifies the lifetime of the services to be added to the service collection. |
Returns
Type | Description |
---|---|
IService |
A reference to this instance after the operation has completed. |
Type Parameters
Name | Description |
---|---|
TSupertype | The type of contract (base type) shared between the host application and the plugins. |
Remarks
This method uses the Plugin