Metalama 1.0 / / Metalama Documentation / Extensions API / Metalama.​Extensions.​Dependency­Injection.​Implementation / Default­Dependency­Injection­Strategy / Pull­Dependency

Method PullDependency

PullDependency(IAspectBuilder<INamedType>, IPullStrategy)

Pulls the dependency from all constructors, i.e. introduce a parameter to these constructors (according to an IPullStrategy), and assigns its value to the dependency property.

Declaration
protected virtual void PullDependency(IAspectBuilder<INamedType> aspectBuilder, IPullStrategy pullStrategy)
Parameters
Type Name Description
IAspectBuilder<INamedType> aspectBuilder

An IAspectBuilder<TAspectTarget> for the target type.

IPullStrategy pullStrategy

A pull strategy (typically the one returned by GetPullStrategy(IFieldOrProperty)).

PullDependency(IAspectBuilder<INamedType>, IPullStrategy, IConstructor)

Pulls the dependency from a given constructor.

Declaration
protected virtual void PullDependency(IAspectBuilder<INamedType> aspectBuilder, IPullStrategy pullStrategy, IConstructor constructor)
Parameters
Type Name Description
IAspectBuilder<INamedType> aspectBuilder
IPullStrategy pullStrategy
IConstructor constructor