Open sandboxFocus

Method TryPullDependency

TryPullDependency(IAspectBuilder<INamedType>, IFieldOrProperty, 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 bool TryPullDependency(IAspectBuilder<INamedType> aspectBuilder, IFieldOrProperty dependencyFieldOrProperty, IPullStrategy pullStrategy)
Parameters
Type Name Description
IAspectBuilder<INamedType> aspectBuilder

An IAspectBuilder<TAspectTarget> for the target type.

IFieldOrProperty dependencyFieldOrProperty

The field or property that exposed the dependency.

IPullStrategy pullStrategy

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

Returns
Type Description
bool

TryPullDependency(IAspectBuilder<INamedType>, IFieldOrProperty, IPullStrategy, IConstructor)

Pulls the dependency from a given constructor.

Declaration
protected virtual bool TryPullDependency(IAspectBuilder<INamedType> aspectBuilder, IFieldOrProperty dependencyFieldOrProperty, IPullStrategy pullStrategy, IConstructor constructor)
Parameters
Type Name Description
IAspectBuilder<INamedType> aspectBuilder
IFieldOrProperty dependencyFieldOrProperty
IPullStrategy pullStrategy
IConstructor constructor
Returns
Type Description
bool