Open sandboxFocus

Interface IPullStrategy

Interface used by DefaultDependencyInjectionStrategy to pull a field or property from the constructor. This interface is instantiated from GetPullStrategy(IFieldOrProperty). You must override this method if you want to provide a custom implementation of IPullStrategy. The default implementation is DefaultPullStrategy.

Namespace: Metalama.Extensions.DependencyInjection.Implementation
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
[CompileTime]
public interface IPullStrategy

Methods

Name Description
GetAssignmentStatement(IParameter)

Gets a statement that assigns the dependency field or property from a parameter or another expression.

GetExistingParameter(IConstructor)

Gets a parameter from which the dependency can be initialized, or null if a new parameter must be created.

GetNewParameter(IConstructor)

Gets the specifications from which a constructor parameter can be constructed. This method is called when GetExistingParameter(IConstructor) returns null.

PullParameter(IParameter, IConstructor)

Returns a PullAction that instructs how a given constructor parameter should be pulled from another constructor.