Class ConstructorInjectionConvention
Uses an instance of System.IServiceProvider to call constructors when creating models.
Inheritance
System.Object
ConstructorInjectionConvention
Implements
Namespace: McMaster.Extensions.CommandLineUtils.Conventions
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class ConstructorInjectionConvention : IConvention
Constructors
| Improve this Doc View SourceConstructorInjectionConvention()
Initializes an instance of ConstructorInjectionConvention.
Declaration
public ConstructorInjectionConvention()
ConstructorInjectionConvention(IServiceProvider)
Initializes an instance of ConstructorInjectionConvention.
Declaration
public ConstructorInjectionConvention(IServiceProvider additionalServices)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | additionalServices | Additional services use to inject the constructor of the model |
Methods
| Improve this Doc View SourceApply(ConventionContext)
Apply the convention.
Declaration
public virtual void Apply(ConventionContext context)
Parameters
Type | Name | Description |
---|---|---|
ConventionContext | context | The context in which the convention is applied. |