Open sandboxFocus

Method TryPullDependency

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

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(IAdviser<IConstructor>, IFieldOrProperty, IPullStrategy)

Pulls the dependency from a given constructor.

Declaration
protected virtual bool TryPullDependency(IAdviser<IConstructor> adviser, IFieldOrProperty dependencyFieldOrProperty, IPullStrategy pullStrategy)
Parameters
Type Name Description
IAdviser<IConstructor> adviser
IFieldOrProperty dependencyFieldOrProperty
IPullStrategy pullStrategy
Returns
Type Description
bool