MetalamaAPI documentationExtensions APIMetalama.​Extensions.​Dependency­Injection.​ImplementationIPull­Strategy
Open sandboxFocus

IPullStrategy Interface

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
public interface IPullStrategy


Name Description

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


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


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.