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 |
GetNewParameter(IConstructor) | Gets the specifications from which a constructor parameter can be constructed. This method is called when GetExistingParameter(IConstructor)
returns |
PullParameter(IParameter, IConstructor) | Returns a PullAction that instructs how a given constructor parameter should be pulled from another constructor. |