UseConstant(TypedConstant)
Creates a pull strategy that passes a constant value to the introduced parameter.
Declaration
public static IPullStrategy UseConstant(TypedConstant constant)Parameters
| Type | Name | Description |
|---|---|---|
| TypedConstant | constant | The constant value to pass to the introduced parameter. |
Returns
| Type | Description |
|---|---|
| IPullStrategy | A pull strategy that uses the specified constant to provide the parameter value. |
Remarks
This is a convenience method equivalent to calling UseExpression(IExpression) with a TypedConstant. Use this when you want all child constructors to pass the same constant value to the introduced parameter.
Example: PullStrategy.UseConstant(TypedConstant.Create(true)) will pass true from all child constructors.