A strategy that defines how an introduced constructor parameter should be propagated (or "pulled") to child constructors in derived classes. For standard implementations, see PullStrategy.
Namespace: Metalama.Framework.Advising
Assembly: Metalama.Framework.dll
Syntax
public interface IPullStrategy : ICompileTimeSerializableRemarks
When you introduce a parameter to a base constructor using IntroduceParameter(IAdviser<IConstructor>, string, IType, TypedConstant, IPullStrategy?, ImmutableArray<AttributeConstruction>) or the corresponding extension methods in AdviserExtensions, this strategy determines how child constructors (in derived classes or in the same class) should obtain the value for this parameter when calling the base constructor.
Cross-Project Operation: Pull strategies operate across project boundaries. Custom implementations must be serializable (implement ICompileTimeSerializable) because the strategy needs to be persisted and applied in projects that reference the project where the parameter was introduced. For example, if you introduce a parameter to a base class in Project A using IntroduceParameterAndPull(string?, IType?, IExpression?), and Project B references Project A and has derived classes, those derived classes will automatically have the parameter added to their constructors.
Methods
| Name | Description |
|---|---|
| GetPullAction(IParameter, IHasParameters) | Gets the PullAction that specifies how to obtain the value for an introduced parameter when it needs to be passed from a child constructor to the constructor where it was introduced. |