Table of Contents

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
object
ConstructorInjectionConvention
Implements

Constructors

ConstructorInjectionConvention()

Initializes an instance of ConstructorInjectionConvention.

public ConstructorInjectionConvention()

ConstructorInjectionConvention(IServiceProvider)

Initializes an instance of ConstructorInjectionConvention.

public ConstructorInjectionConvention(IServiceProvider additionalServices)

Parameters

additionalServices IServiceProvider

Additional services use to inject the constructor of the model

Methods

Apply(ConventionContext)

Apply the convention.

public virtual void Apply(ConventionContext context)

Parameters

context ConventionContext

The context in which the convention is applied.