Provides factory methods for creating standard implementations of the IPullStrategy interface.
Namespace: Metalama.Framework.Advising
Assembly: Metalama.Framework.dll
Syntax
public static class PullStrategyRemarks
A pull strategy determines how the value of an introduced constructor parameter is supplied in two places: the framework-emitted forwarding constructor (when the required-parameter overload is used), and chained or derived constructors that must pass a value to the mutated constructor. This class provides common implementations that cover most scenarios. For custom behavior, implement IPullStrategy directly.
The pull strategy is invoked for each constructor that calls the constructor where the parameter was introduced,
either through : base(...) or : this(...) syntax, including the generated forwarding constructor.
The strategy returns a PullAction that specifies what value to pass for the introduced parameter.
Methods
| Name | Description |
|---|---|
| IntroduceParameterAndPull(string?, IType?, IExpression?, IExpression?, bool, bool) | Creates a pull strategy that introduces a new parameter in the child constructor and passes its value to the introduced parameter. |
| UseConstant(TypedConstant) | Creates a pull strategy that passes a constant value to the introduced parameter. |
| UseExpression(IExpression) | Creates a pull strategy that passes a static expression value to the introduced parameter. |