Class ServiceCollectionExtensions
Inherited Members
Namespace: LemonEdge.API.Core.Reflection
Assembly: LemonEdge.API.Core.dll
Syntax
public static class ServiceCollectionExtensions
Methods
AddAutoFactory<TFactory>(IServiceCollection)
Creates a proxy to a factory interface to auto-resolve parameters in construction that aren't defined in the factory. WARNING: The return type MUST be a concrete type.
Declaration
public static IServiceCollection AddAutoFactory<TFactory>(this IServiceCollection services) where TFactory : class
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The service collection. |
Type Parameters
| Name | Description |
|---|---|
| TFactory | The interface. |
Examples
Specifying: IControlCommandFactory { public EPCommand Create(IModelLayoutCommon modelLayoutCommon); } Creates an EPCommand using the constructor starting with IModelLayoutCommon and auto-resolving any others.