Open sandboxFocus

Class DefaultPullStrategy

The default implementation of IPullStrategy.

Inheritance
DefaultPullStrategy
Implements
Namespace: Metalama.Extensions.DependencyInjection.Implementation
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
public class DefaultPullStrategy : IPullStrategy

Constructors

Name Description
DefaultPullStrategy(DependencyProperties, IFieldOrProperty)

Initializes a new instance of the DefaultPullStrategy class.

Properties

Name Description
AssignedFieldOrProperty

Gets the field or property that must be assigned by the GetAssignmentStatement(IParameter) method.

IntroducedFieldOrProperty

Gets the dependency field or property in the target type.

ParameterType

Gets the type of the constructor parameter. This is used by both GetNewParameter(IConstructor) and GetExistingParameter(IConstructor).

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.