Class ConstructorInjectionConvention
- Namespace
- McMaster.Extensions.CommandLineUtils.Conventions
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
Uses an instance of IServiceProvider to call constructors when creating models.
public class ConstructorInjectionConvention : IConvention
- Inheritance
-
objectConstructorInjectionConvention
- Implements
Constructors
ConstructorInjectionConvention()
Initializes an instance of ConstructorInjectionConvention.
public ConstructorInjectionConvention()
ConstructorInjectionConvention(IServiceProvider)
Initializes an instance of ConstructorInjectionConvention.
public ConstructorInjectionConvention(IServiceProvider additionalServices)
Parameters
additionalServicesIServiceProviderAdditional services use to inject the constructor of the model
Methods
Apply(ConventionContext)
Apply the convention.
public virtual void Apply(ConventionContext context)
Parameters
contextConventionContextThe context in which the convention is applied.